better shutdown handling

This commit is contained in:
kimchy 2010-07-01 02:41:00 +03:00
parent c2d02e4e3a
commit c75a56ca17
1 changed files with 1 additions and 1 deletions

View File

@ -496,7 +496,7 @@ public class TransferThreadPoolExecutor extends AbstractExecutorService {
mainLock.lock();
boolean canExit;
try {
canExit = runState >= STOP || (queueSize.get() == 0 && poolSize.get() > corePoolSize);
canExit = runState >= STOP || (queueSize.get() == 0 && (runState >= SHUTDOWN || poolSize.get() > corePoolSize));
} finally {
mainLock.unlock();
}