|
Re: what to do about InterruptedExceptioninThreadPoolExecutor.awaitTerminat: msg#00025java.jsr.166-concurrency
On 10/18/06, Dawid Kurzyniec <dawidk@xxxxxxxxxxxxxxxx> wrote: > 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)... > It looks like by the time I initially wrote the code (and even now) I wasn't aware of this one. Thanks. ./alex -- .w( the_mindstorm )p. > Regards, > Dawid > >
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: what to do about InterruptedExceptioninThreadPoolExecutor.awaitTermination, Dawid Kurzyniec |
|---|---|
| Next by Date: | JCiP Memoizer, Alexandru Popescu |
| Previous by Thread: | Re: what to do about InterruptedExceptioninThreadPoolExecutor.awaitTermination, Dawid Kurzyniec |
| Next by Thread: | Re: what to do about InterruptedException inThreadPoolExecutor.awaitTermination, David Holmes |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |