orderly shutdown

This commit is contained in:
Leijurv
2023-07-31 15:06:25 -07:00
parent 64a881f990
commit 46f38f2ce7

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