"adrian(a)jboss.org" wrote : The fix/work around we have is to stop step (8) from
occuring.i.e. you never allow the thread pool to go below a minimum of one thread which
avoids the race condition - there is always at least one thread available to execute the
work.
Ah, I understand. I intuited that this might be the case so I made the core thread pool
size be implicitly at least 1, but I agree that this is undesirable overall. It would be
nice if thread pools which are never used would never produce any threads. For my
"blocking" policy, I'm not actually using a special rejection handler;
instead I wrap the BlockingQueue with one that blocks on "offer". I still have
to do some testing to see if that's a good approach, however I suspect it will not
suffice to avoid this race condition even if it is a usable approach overall.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4187382#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...