[concurrency-interest] Cancelling Tasks returning immediately..
minnieh at corp.earthlink.net
Mon Apr 4 00:51:26 EDT 2005
We have unique situation where I thought I may seek you help for some useful
My thread pool has an unbounded queue associated to it. However, while a
task is waiting on the queue to be
Processed, it cannot wait indefinitely, after a certain period of time, it
needs to cancel out and return a different result.
Is it possible to achieve this using the concurrent utilities of JDK1.5.
My queue has to be unbounded, and the task (callable) that gets put on the
queue needs to be time bound. How can I make the cancelled task return
immediately as opposed to the result that can only be retrieved using method
get when the computation has completed or the task gets its turn to be
executed by the pool.
Appreciate your help.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Concurrency-interest