[concurrency-interest] ConcurrentLinkedQueue vs. ConcurrentLinkedDeque

Martin Buchholz martinrb at google.com
Sun Feb 28 01:14:41 EST 2016

On Sat, Feb 27, 2016 at 1:47 PM, Christian Schudt
<christian.schudt at gmx.de> wrote:
> Ok, even when it’s fixed in JDK 9, when would you use a CLQ over a CLDeque? Is it „only“ to save 40% performance when only needing a queue? (of course still worth it). Maybe the public JavaDoc should mention it.

It's funny you ask that.  I love ConcurrentLinkedDeque, but mostly for
the cool tech ("it's impossible to safely update a lock-free doubly
linked list"), but I don't have a good example of when you need it -
in practice a concurrent queue is usually good enough.
ConcurrentLinkedQueue is simpler and uses less computing resources

More information about the Concurrency-interest mailing list