Timed Peek for BlockingDeque

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Timed Peek for BlockingDeque

Jason Mehrens
Are timed peeks a worth while addition to the BlockingDeque?  There was a
old RFE
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5099778 filed against the
BlockingQueue about this issue. I would think it could be morphed into:

public E peekFirst (long timeout, TimeUnit unit) throws
InterruptedException;
public E peekLast (long timeout, TimeUnit unit) throws InterruptedException;

I'm not sure if timed peeks pull their weight but, I figure it would be
worth while to raise the issue.

Jason Mehrens


_______________________________________________
Concurrency-interest mailing list
[hidden email]
http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest
Reply | Threaded
Open this post in threaded view
|

Re: Timed Peek for BlockingDeque

tpeierls
Jason Mehrens wrote:
> I'm not sure if timed peeks pull their weight but, I figure it would be
> worth while to raise the issue.

If it can't be incorporated for Mustang, but there is still interest in it, it might be nice to
provide (unofficially) a TimedPeekAdapter that turns a BQ into a BQWithTimedPeek (better name).

--tim

_______________________________________________
Concurrency-interest mailing list
[hidden email]
http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest