Fix bugs in CQCPTree

This commit is contained in:
TomTheFurry
2022-08-20 15:49:12 +08:00
parent a20ab505ef
commit 3fc60909d2
2 changed files with 8 additions and 1 deletions
@@ -554,6 +554,13 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv
public void stop(boolean blocking) {
EVENT_LOGGER.info("Batch Chunk Generator shutting down...");
executors.shutdownNow();
Iterator<GenerationEvent> iter = events.iterator();
while (iter.hasNext())
{
GenerationEvent event = iter.next();
event.future.cancel(true);
iter.remove();
}
if (blocking) try {
if (!executors.awaitTermination(10, TimeUnit.SECONDS)) {
EVENT_LOGGER.error("Batch Chunk Generator shutdown failed! Ignoring child threads...");
+1 -1
Submodule core updated: 1cc00b7174...b80bfe813c