[concurrency-interest] ArrayBlockingQueue: concurrent put and take
viktor.klang at gmail.com
Thu Jul 3 05:35:51 EDT 2014
I think it was a mistake to have the BlockingQueue interface too broad. (A
general issue with the JDK collections)
(There's also a lack of non-blocking SPSC, MPSC and SPMC queues in the JDK.)
On Thu, Jul 3, 2014 at 1:37 AM, Martin Buchholz <martinrb at google.com> wrote:
> LinkedBlockingQueue has a two-lock strategy, but ArrayBlockingQueue does
> not. It took us years to figure out how to get the iterator to behave
> perfectly in ABQ, and I'm afraid of touching it again or introducing
> additional complexity. Using a backing array instead of a linked list has
> some advantages, but it is hostile to concurrent collection implementers
> ... yes, even when everything is guarded by a single lock.
> On Wed, Jul 2, 2014 at 4:03 PM, vikas <vikas.vksingh at gmail.com> wrote:
>> It may be a naive question, But i have the same question on why ABQ cant
>> two-lock algorithm.
>> It would be a great help if somebody can point out to me, why two-lock
>> algorithm wouldn't work in ABQ. Which scenario or race condition makes
>> two-lock algo infeasible in ABQ. A simple example of that race conditon
>> would help a lot.
>> Thanks for having such a great mailing a list. I have learned a lot and
>> still learning.
>> View this message in context:
>> Sent from the JSR166 Concurrency mailing list archive at Nabble.com.
>> Concurrency-interest mailing list
>> Concurrency-interest at cs.oswego.edu
> Concurrency-interest mailing list
> Concurrency-interest at cs.oswego.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Concurrency-interest