[concurrency-interest] BlockingQueue or Queue / peek()

bestsss stanimir at riflexo.com
Thu Feb 2 16:23:22 EST 2012


I don't quite see the usefulness of the method.
As it's concurrent, by the time peek returns the element might not be in the
queue already.

What kind of a use case do you fancy?


Johannes.Lichtenberger wrote:
> 
> On 02/02/2012 09:41 PM, Yuval Shavit wrote:
>> I may be missing something in your question, but it seems to me that
>> BlockingQueue does contain a method similar to the method you're asking
>> for. In fact, it's exactly what you're looking for. Same name, same
>> inputs,
>> same output, same exception.
> 
> E peek(long, TimeUnit)?
> 
> _______________________________________________
> Concurrency-interest mailing list
> Concurrency-interest at cs.oswego.edu
> http://cs.oswego.edu/mailman/listinfo/concurrency-interest
> 
> 

-- 
View this message in context: http://old.nabble.com/BlockingQueue-or-Queue---peek%28%29-tp33252294p33253261.html
Sent from the JSR166 Concurrency mailing list archive at Nabble.com.



More information about the Concurrency-interest mailing list