[concurrency-interest] Queue with interrupt

Viktor Klang 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>
wrote:

>
> > 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.
>
> -Chris.
>
> _______________________________________________
> Concurrency-interest mailing list
> Concurrency-interest at cs.oswego.edu
> http://cs.oswego.edu/mailman/listinfo/concurrency-interest
>



-- 
Cheers,
√
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20170518/af278e4f/attachment.html>


More information about the Concurrency-interest mailing list