[concurrency-interest] BoundedPriorityBlockingQueue ?
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
> > 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...
More information about the Concurrency-interest