|
| <prev next> |
How to use Callable instead of Runnable with ScheduledThreadPoolExecutor?: msg#00000java.jsr.166-concurrency
Hello concurrent people, _______________________________________________I have been futzing around with the Java 1.5 concurrent classes for a while now and more or less have the hang of things. But there is one thing I can't figure out. I'd like to schedule a task to execute every x seconds, have it return me a list of Futures for those tasks and, based on the result in each Future, do something. I'd like to use either scheduleAtFixedRate() or scheduleWithFixedDelay() but both of these take Runnable as their first parameter, and I'd like to use a Callable (to get a Result). I see that schedule() and submit() b oth take Callable as a parameter but that's for a one-shot execution, I need something periodic. Any way to do this? Many thanks guys, Bob Concurrency-interest mailing list Concurrency-interest@xxxxxxxxxxxxxxxxxxxx http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Next by Date: | Re: How to use Callable instead of Runnable with ScheduledThreadPoolExecutor?, Tim Peierls |
|---|---|
| Next by Thread: | Re: How to use Callable instead of Runnable with ScheduledThreadPoolExecutor?, Tim Peierls |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |