better shutdown handling
This commit is contained in:
parent
c2d02e4e3a
commit
c75a56ca17
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue