From 3fc60909d2d1c19812652dfc044605a122853b49 Mon Sep 17 00:00:00 2001 From: TomTheFurry Date: Sat, 20 Aug 2022 15:49:12 +0800 Subject: [PATCH] Fix bugs in CQCPTree --- .../worldGeneration/BatchGenerationEnvironment.java | 7 +++++++ core | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/BatchGenerationEnvironment.java b/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/BatchGenerationEnvironment.java index 8eb83a279..1a22daba2 100644 --- a/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/BatchGenerationEnvironment.java +++ b/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/BatchGenerationEnvironment.java @@ -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 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..."); diff --git a/core b/core index 1cc00b717..b80bfe813 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 1cc00b717417c0a97cbfb42461e8d577d17b1438 +Subproject commit b80bfe813c7bcad876a72c39ea1a1b33bb072500