Cancel before shutting down executor

This commit is contained in:
Brady 2023-06-17 02:33:43 -05:00
parent 395706edc9
commit 0290b344dc
No known key found for this signature in database
GPG Key ID: 73A788379A197567
1 changed files with 5 additions and 0 deletions

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();