[concurrency-interest] ConcurrentLinkedQueue vs. ConcurrentLinkedDeque

Peter Levart peter.levart at gmail.com
Sun Feb 28 08:19:00 EST 2016

On 02/28/2016 07:14 AM, Martin Buchholz wrote:
> 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

ConcurrentLinkedDeque would be very nice if there was a way to get 
access to internal node when adding an element to the deque. One would 
then be able to remove the element in constant time. Something in the 
lines of this:


Regards, Peter

> _______________________________________________
> Concurrency-interest mailing list
> Concurrency-interest at cs.oswego.edu
> http://cs.oswego.edu/mailman/listinfo/concurrency-interest

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20160228/ea63643b/attachment.html>

More information about the Concurrency-interest mailing list