Fix lock on overflow/underflow in ArrayBlockingQueue

This commit is contained in:
Alexey Andreev 2018-01-23 22:08:44 +03:00
parent 21411cd1d8
commit 5ec05b9446

View File

@ -417,7 +417,8 @@ public class TArrayBlockingQueue<E> extends TAbstractQueue<E> implements TBlocki
}
if (waitHandlers != null) {
while (!waitHandlers.isEmpty()) {
Platform.postpone(() -> waitHandlers.remove().changed());
WaitHandler handler = waitHandlers.remove();
Platform.postpone(() -> handler.changed());
}
waitHandlers = null;
}