[concurrency-interest] java.util.concurrent.ThreadPoolExecutor does not execute jobs in some cases

Joe Bowbeer joe.bowbeer at gmail.com
Thu Apr 23 19:53:36 EDT 2009


On Wed, Apr 22, 2009 at 10:33 AM, Ashwin Jayaprakash wrote:

>
> Workaround:
> Set the corePoolSize to be equal to the maximumPoolSize. But this is scary
> because if the pool ever reaches its max limit then all those threads will
> just sit there instead of shutting down after the idle time out.
>
>
You may be able to tune your workaround and reduce fear of lingering threads
by using the methods:

  allowCoreThreadTimeOut(boolean value)
  setKeepAliveTime(long time, TimeUnit unit)

Joe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20090423/2d4c4ad5/attachment.html>


More information about the Concurrency-interest mailing list