|
Re: Best way to remove a scheduled task with ScheduledThreadPoolExecutor: msg#00012java.jsr.166-concurrency
scheduleAtFixedRate returns a (Scheduled)Future instance associated with your Runnable. This Future is what you cancel. If you want to cancel each and every one, you can shutdownNow the executorService. On 10/10/06, Robert Bowen <syg6@xxxxxxxxx> wrote: > > Hmmm ... I'm at home now and don't have my code in front of me but ... if I > am not mistaken, when you call > ScheduledThreadPoolExecutor.scheduleAtFixedRate(Runnable) > what you're left with is an Executor with Future Tasks, each one an instance > of your Runnable. So my question remains, how do I get access to each > individual Runnable / Future Task, so I can call cancel() on it? > > Maybe I'll see it more clearly when I have the code in front of me ... > > Thanks for your help! > Bob >
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Best way to remove a scheduled task with ScheduledThreadPoolExecutor, Robert Bowen |
|---|---|
| Next by Date: | Re: Best way to remove a scheduled task with ScheduledThreadPoolExecutor, Robert Bowen |
| Previous by Thread: | Re: Best way to remove a scheduled task with ScheduledThreadPoolExecutor, Robert Bowen |
| Next by Thread: | Re: Best way to remove a scheduled task with ScheduledThreadPoolExecutor, Robert Bowen |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |