[concurrency-interest] Executors: Wrapper to cancel tasks in shutdownNow()?

Tim Peierls tim at peierls.net
Wed Apr 14 10:41:45 EDT 2010


The tasks returned by shutdownNow haven't begun execution, so there's no
need to cancel them.

--tim

On Wed, Apr 14, 2010 at 9:53 AM, Bryan Thompson <bryan at systap.com> wrote:

> Hello,
>
> Is there some handy delegation pattern available, such as found on
> Executors, to wrap an ExecutorService implementation such that
> ExecutorService#shutdownNow() cancels each task in the returned list?  While
> this might not always be want people want to do, it does seem to be a very
> common pattern.
>
> Thanks,
> Bryan
> _______________________________________________
> Concurrency-interest mailing list
> Concurrency-interest at cs.oswego.edu
> http://cs.oswego.edu/mailman/listinfo/concurrency-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20100414/2d4ed8a1/attachment.html>


More information about the Concurrency-interest mailing list