[concurrency-interest] question about ExecutorCompletionService

yangjs yangjs at alibaba-inc.com
Thu Aug 31 00:02:04 EDT 2006


hi,all
  I have a Consumer poll task from ExecutorCompletionService ,this class has  no method such as isTerminated, when app is shutdown, I don't know when to shutdown my Consumer ,even if poll return null,.I can't accept consumer lost task . if  ExecutorCompletionService have method isTerminated as follow,thing will be simple. I can check when service poll return null and service isTerminated, my consumer can shutdown safely. is right??
why not provide such method ?

public boolean isTerminated(){
   return executor.isTerminated();
 }
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/attachments/20060831/536c9467/attachment.html 


More information about the Concurrency-interest mailing list