Shutdown ForkJoinPool worker on disable (#3247)

This commit is contained in:
Luck 2022-02-07 21:27:26 +00:00
parent 65751cd56b
commit fe80ba6cc4
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -96,6 +96,13 @@ public abstract class AbstractJavaScheduler implements SchedulerAdapter {
} catch (InterruptedException e) {
e.printStackTrace();
}
this.worker.shutdown();
try {
this.worker.awaitTermination(1, TimeUnit.MINUTES);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
private static final class ErrorReportingExecutor implements Executor {