[concurrency-interest] BoundedPriorityBlockingQueue ?

Hanson Char hanson.char at gmail.com
Tue Sep 12 22:18:09 EDT 2006

Hi David,

I see.  This sounds good to me too.  And it doesn't seem difficult to
implement one.  Whether it's useful or worth implementing is a question for
the originator.


On 9/12/06, David Holmes <dcholmes at optusnet.com.au> wrote:
>  Hi Hanson,
> Actually what I said, or meant, was the other way around. :)
> If you use a blocking put() then you are accepting that you don't care
> about the "priority" ordering of threads trying to submit. No problem, no
> complexity and no "madness". :)
> If you do care about the order of threads trying to submit then you should
> not use put() but use offer() so that you can "deal with it". It is in
> trying to "deal with it" that I think the "madness" lies ;-)
> So the normal BQ semantics are quite sufficient for the job. No need to
> introduce a new kind of semi-blocking queue with similar methods but
> different semantics. The user can choose blocking put() with no
> blocking-order guarantees; or else non-blocking offer() and figure it out
> themselves.
> Cheers,
> David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/attachments/20060912/63d3e70a/attachment-0001.html 

More information about the Concurrency-interest mailing list