[concurrency-interest] BoundedPriorityBlockingQueue ?
Brian Goetz
brian at quiotix.com
Tue Sep 12 13:16:07 EDT 2006
The tricky part is if you want to guarantee that the thread offering the
element of highest priority is first to be unblocked.
Kasper Nielsen 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
> _______________________________________________
> Concurrency-interest mailing list
> Concurrency-interest at altair.cs.oswego.edu
> http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest
More information about the Concurrency-interest
mailing list