Cancel before shutting down executor

This commit is contained in:
Brady
2023-06-17 02:33:43 -05:00
parent 395706edc9
commit 0290b344dc

View File

@@ -60,7 +60,12 @@ public final class NetherPathfinderContext {
), this.executor);
}
public void cancel() {
NetherPathfinder.cancel(this.context);
}
public void destroy() {
this.cancel();
// Ignore anything that was queued up, just shutdown the executor
this.executor.shutdownNow();