add another test if the pool size is greater than the core pool size before a worker can exit
This commit is contained in:
parent
6709518c4e
commit
811559f393
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue