[concurrency-interest] BlockingDeque and revised Deque

Joshua Bloch josh@bloch.us
Fri, 26 Nov 2004 13:57:00 -0500


I like the new interfaces, but that should come as no surprise: Doug
ang I were partners in this crime:)

Regarding Doug's open questions:

> But we are no longer so sure about whether the ConcurrentLinkedDeque
> class now in jsr166x is important enough to put into
> java.util.concurrent. 

When in doubt, leave it out.


> But doing this mildly breaks a different convention, of keeping
> java.util free of all references to java.util.concurrent. So
> we are left with a small judgement call. Should we...
>   1. Add both of these to java.util.Collections
>   2. Create a similar java.util.concurrent.ConcurrentCollections class
>      and define asLifoBlockingQueue in it, but add asLifoQueue to
>      java.util.Collections

It boils down to whether we anticipate (much) more stuff like this in
the future.  I wouldn't mind jamming both adapters into
java.util.Collections unless asLifoBlockingQueue is the first in a
long line.