Since notify might not wake up the right thread, notifyAll should be used instead. (#6931)

* Since notify might not wake up the right thread, notifyAll should be used instead.

* Comment is added about why notifyAll() is not used.
This commit is contained in:
Furkan KAMACI 2019-02-20 20:02:58 +03:00 committed by Gian Merlino
parent 871b9d2f4c
commit 9a521526c7
1 changed files with 1 additions and 0 deletions

View File

@ -404,6 +404,7 @@ public class RocketMQFirehoseFactory implements FirehoseFactory<InputRowParser<B
this.requestsWrite.add(request);
if (!hasNotified) {
hasNotified = true;
// No need to use notifyAll here since extended class com.alibaba.rocketmq.common.ServiceThread handles it
notify();
}
}