From 3cb8bbeaa7b172a1ee833f9ec30e6153cc217001 Mon Sep 17 00:00:00 2001 From: James Seibel Date: Thu, 9 Oct 2025 20:12:22 -0500 Subject: [PATCH] Fix some tasks being dropped --- .../core/util/threading/PriorityTaskPicker.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/com/seibel/distanthorizons/core/util/threading/PriorityTaskPicker.java b/core/src/main/java/com/seibel/distanthorizons/core/util/threading/PriorityTaskPicker.java index 26024997b..d9569cc81 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/util/threading/PriorityTaskPicker.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/util/threading/PriorityTaskPicker.java @@ -80,9 +80,9 @@ public class PriorityTaskPicker // start tasks until we're running as many threads as acceptable by the config, // or until this executor is empty, // or until we should move on to the next executor - while (this.occupiedThreadsRef.get() < Config.Common.MultiThreading.numberOfThreads.get() - && (task = executor.taskQueue.poll()) != null - && queuedTaskCount <= maxQueuedBeforeOverflow) + while (this.occupiedThreadsRef.get() < Config.Common.MultiThreading.numberOfThreads.get() + && queuedTaskCount <= maxQueuedBeforeOverflow + && (task = executor.taskQueue.poll()) != null) { queuedTaskCount++;