[concurrency-interest] BoundedPriorityBlockingQueue ?

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

>From a cursory look at the existing implementation of the
PriorityBlockingQueue, it seems implementing a blocking put or
offer(timeout) that actually blocks upon the queue size being full (if a
queue size is made specifiable) without compromising the existing level of
concurrency is not difficult.

Or am I missing something here ?


On 9/12/06, Kasper Nielsen <kav at it.edu> wrote:
> Hanson Char wrote:
> > Say if you had such BoundedPriorityBlockingQueue, what would be the
> > preferred behavior when the queue is full ?  Should the producer blocks
> in
> > enqueueing, or return immediately with a false boolean value ?
> >
> > Hanson
> >
> It should obey the standard BlockingQueue contract.
> offer, pool -> no blocking
> offer(timeout), put, poll(timeout), take -> blocking
> - Kasper
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/attachments/20060912/82a63a67/attachment.html 

More information about the Concurrency-interest mailing list