[concurrency-interest] ArrayBlockingQueue: concurrent put and take

Martin Buchholz martinrb at google.com
Wed Jul 2 22:51:36 EDT 2014

But what are you trying to achieve?  If you have perfect timing, and a put
and take are always concurrent, and the queue is always half-full, then you
might be able to get (only!) a 2x speedup.  But you're not going to get
those perfect conditions.

Anyways, go ahead and implement it and see what happens.

On Wed, Jul 2, 2014 at 6:07 PM, vikas <vikas.vksingh at gmail.com> wrote:

> Thanks Martin,
>     I agree with functionality like iterator etc, implementations becomes
> more difficult.
> But if narrow down the scope of ABQ to only put and take. Then i think it
> would be possible to have
> concurrent put and take with a single contention point on the AtomicCounter
> --
> View this message in context:
> http://jsr166-concurrency.10961.n7.nabble.com/ArrayBlockingQueue-concurrent-put-and-take-tp1306p11145.html
> Sent from the JSR166 Concurrency mailing list archive at Nabble.com.
> _______________________________________________
> 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/20140702/3a2fb923/attachment.html>

More information about the Concurrency-interest mailing list