Description
I happened to run across this in code inspection (actually just searching GitHub for occurrences of notifyAll()) to see if I can spot bugs around them in a few minutes, as part of some other silly exercise), so I figured I’d point it out here in case it matters.
The (sole?) purpose of org.kaazing.net.impl.util.BlockingQueueImpl appears to be to add interrupt and end of stream capability to j.u.c.ArrayBlockingQueue. However, in the implementation, a done() or reset() call may leave threads blocked on a take() or put() until actual contents is added or removed to/from the queue. For example, if done() or reset() are executed right before a thread executes this line of code (but after that thread entered the take() method), the notifyAll() calls in done() or reset(), and the done indication, will have no effect and the thread can remain blocked until further contents arrives on the queue.
A similar situation can happen in the put() implementation here.