mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 14:47:19 -04:00
single element write can only really wakeup a single thread
Fixes #6800
This commit is contained in:
parent
32777c682b
commit
6ac0b6a848
1 changed files with 3 additions and 1 deletions
|
@ -330,7 +330,9 @@ public class Queue implements Closeable {
|
|||
this.unreadCount++;
|
||||
|
||||
// if the queue was empty before write, signal non emptiness
|
||||
if (wasEmpty) { notEmpty.signalAll(); }
|
||||
// a simple signal and not signalAll is necessary here since writing a single element
|
||||
// can only really enable a single thread to read a batch
|
||||
if (wasEmpty) { notEmpty.signal(); }
|
||||
|
||||
// now check if we reached a queue full state and block here until it is not full
|
||||
// for the next write or the queue was closed.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue