On Wed, 5 Feb 2025 15:36:15 GMT, kabutz <d...@openjdk.org> wrote:

> The LinkedBlockingDeque does not behave consistently with other concurrency 
> components. If we call putFirst(), putLast(), takeFirst(), or takeLast() with 
> a thread that is interrupted, it does not immediately throw an 
> InterruptedException, the way that ArrayBlockingQueue and LInkedBlockingQueue 
> does, because instead of lockInterruptibly(), we call lock(). It will only 
> throw an InterruptedException if the queue is full (on put) or empty (on 
> take). Since interruptions are frequently used as a shutdown mechanism, this 
> might prevent code from ever shutting down.

Thanks for finding this. The only question is whether we believe that any 
existing usage might depend on current behavior, and if so should it be done 
anyway?

-------------

PR Comment: https://git.openjdk.org/jdk/pull/23464#issuecomment-2637728302

Reply via email to