[concurrency-interest] Queue with interrupt
viktor.klang at gmail.com
Thu May 18 07:56:38 EDT 2017
OTOH, I'd rather avoid Blocking* whenever possible.
On Thu, May 18, 2017 at 1:43 PM, Chris Hegarty <chris.hegarty at oracle.com>
> > On 17 May 2017, at 10:29, David Holmes <davidcholmes at aapt.net.au> wrote:
> > ...
> > If there are tasks in the queue then the worker is not waiting for new
> tasks to do - so you've changed your requirements. You would need a deque
> to allow sentinel tasks to be forced to the head of the queue.
> I’ve always wished that we could somehow squeeze a sentinel into the
> implementation in order to provide a “CloseableBlockingQueue” with a
> blocking takeOrNull(), or similarly named, method. Rather than folk having
> to roll their own.
> Concurrency-interest mailing list
> Concurrency-interest at cs.oswego.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Concurrency-interest