[concurrency-interest] Cancelling Tasks returning immediately..

Minnie Haridasa minnieh at corp.earthlink.net
Mon Apr 4 00:51:26 EDT 2005


Hello,

 

We have unique situation where I thought I may seek you help for some useful
hints.

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.

Thanks

MH

-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/attachments/20050403/c81a13bb/attachment.htm


More information about the Concurrency-interest mailing list