orderly shutdown

This commit is contained in:
Leijurv 2023-07-31 15:06:25 -07:00
parent 64a881f990
commit 46f38f2ce7
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A
1 changed files with 5 additions and 0 deletions

View File

@ -467,6 +467,11 @@ public final class ElytraBehavior implements Helper {
this.solver.cancel(true);
}
this.solverExecutor.shutdown();
try {
while (!this.solverExecutor.awaitTermination(Long.MAX_VALUE, TimeUnit.NANOSECONDS)) {}
} catch (InterruptedException e) {
e.printStackTrace();
}
this.context.destroy();
}