tag:blogger.com,1999:blog-10039526.post111242575225008309..comments2007-10-23T21:20:49.727+10:00Comments on David Kemp's Blog: Futures and Eventual Values Part 3David Kemphttp://www.blogger.com/profile/12250289605528269244noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-10039526.post-20145119022665035122007-10-23T21:20:00.000+10:002007-10-23T21:20:00.000+10:00Interesting question. I had to peek at the source...Interesting question. I had to peek at the source code of FutureTask, and it looks like cancel() invokes interrupt() on the associated Thread. I believe that, so long as you explicitly release your resources inside 'finally' blocks, then you can be sure they will be released. It is worth experimenting with this, and having a read of the Java API on Thread.interrupt(). I am surprised to see a comment more than two years after I posted the blog.David Kemphttp://www.blogger.com/profile/12250289605528269244noreply@blogger.comtag:blogger.com,1999:blog-10039526.post-69564731009718921092007-10-23T07:17:00.000+10:002007-10-23T07:17:00.000+10:00when a FutureTask computation is cancelled, does t...when a FutureTask computation is cancelled, does that release all the resources (DB connections etc.) held by the computing thread i.e. the callable object?Aniruddhahttp://www.blogger.com/profile/10994632519860539482noreply@blogger.com