[concurrency-interest] what to do about InterruptedExceptioninThreadPoolExecutor.awaitTermination

Dawid Kurzyniec dawidk at mathcs.emory.edu
Tue Oct 17 21:23:35 EDT 2006

Alexandru Popescu wrote:
>> But I am not clear why you need to
>> shutdown the executor in the code above. Do you want to wait for _all_
>> submitted tasks to finish, or just the one you just submitted? In the
>> latter case, you should call get() on the future object returned from
>> submit(), instead of awaitTermination on the executor.
> The reason I need an awaitTimeout is cause I must be able to timeout the method.

There is also future.get(timeout)...


More information about the Concurrency-interest mailing list