[concurrency-interest] Strange behaviour with LinkedBlockingQueue JDK 1.4 backport

Dawid Kurzyniec dawidk@mathcs.emory.edu
Mon, 13 Dec 2004 12:16:44 -0500

Jean Morissette wrote:

> Hi,
> Running this test on 
> edu.emory.mathcs.backport.java.util.concurrent.LinkedBlockingQueue 
> cause the Producer and Consumer threads to block indefinitely.  Am I 
> missing something?

Hello Jean,

There is a bug in LinkedBlockingQueue that causes this code to deadlock. 
Also the clear() method is affected. I have fixed it (hopefully I got it 
right this time) and put in CVS; it will be a couple more days before I 
prepare new distribution but meanwhile, the new source file is available at:


Thanks for reporting this.