add another test if the pool size is greater than the core pool size before a worker can exit

This commit is contained in:
kimchy 2010-06-30 23:08:05 +03:00
parent 6709518c4e
commit 811559f393
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;
canExit = runState >= STOP || (queueSize.get() == 0 && poolSize.get() > corePoolSize);
} finally {
mainLock.unlock();
}