[concurrency-interest] Queue with interrupt

Jochen Theodorou blackdrag at gmx.org
Wed May 17 06:07:06 EDT 2017



On 17.05.2017 11:29, David Holmes 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.


ah... now I see what I have overlooked.. I should have been using 
Dequeue/LinkedBlockingDeque instead.

yes, that explains also why I had the feeling I am doing something stupid ;)

Thanks

bye Jochen


More information about the Concurrency-interest mailing list