Canceled tasks should be immediately removed from the work queue at time of cancellation.

This commit is contained in:
MobiusDevelopment
2019-05-17 00:20:38 +00:00
parent 77e5379d97
commit 71568c1a02
14 changed files with 14 additions and 0 deletions

View File

@ -62,6 +62,7 @@ public final class ThreadPool
for (ScheduledThreadPoolExecutor threadPool : SCHEDULED_POOLS)
{
threadPool.setRejectedExecutionHandler(new RejectedExecutionHandlerImpl());
threadPool.setRemoveOnCancelPolicy(true);
threadPool.prestartAllCoreThreads();
}
for (ThreadPoolExecutor threadPool : INSTANT_POOLS)