One observation about using a corePoolSize of 0. The most obvious reason you'd do
this is to prevent a thread pool from having threads hanging around when there are no
tasks. However, if you have a non-zero-length queue, then no threads will be started
until the queue is full. This means that if the queue is never filled, the tasks will
never run.
I think that for this use case, the proper solution, introduced as of JDK6 into
ThreadPoolExecutor, is to use a non-zero corePoolSize and enable core thread timeouts.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4196995#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...