Fix synchronization
This commit is contained in:
parent
4a5a42b7fd
commit
858d1f86a6
@ -37,10 +37,10 @@ class QueueToConsumer<T> implements IQueueToConsumer<T> {
|
||||
boolean crashed = true;
|
||||
try {
|
||||
if (consumer.tryConsume(value)) {
|
||||
crashed = false;
|
||||
shouldAdd = false;
|
||||
preAddQueued.decrementAndGet();
|
||||
}
|
||||
crashed = false;
|
||||
} finally {
|
||||
if (crashed) {
|
||||
shouldAdd = false;
|
||||
|
Loading…
Reference in New Issue
Block a user