diff --git a/core/src/main/java/com/boydti/fawe/util/SetQueue.java b/core/src/main/java/com/boydti/fawe/util/SetQueue.java index 1bed49bd..ca0864e2 100644 --- a/core/src/main/java/com/boydti/fawe/util/SetQueue.java +++ b/core/src/main/java/com/boydti/fawe/util/SetQueue.java @@ -104,7 +104,7 @@ public class SetQueue { long currentAllocate = allocate - absDiff; if (!emptyTasks) { - long taskAllocate = empty ? currentAllocate : currentAllocate >> 1; + long taskAllocate = activeQueues.isEmpty() ? currentAllocate : 1 + (currentAllocate >> 1); long used = 0; boolean wait = false; do { diff --git a/core/src/main/java/com/boydti/fawe/util/TaskManager.java b/core/src/main/java/com/boydti/fawe/util/TaskManager.java index 683a2c49..2663924e 100644 --- a/core/src/main/java/com/boydti/fawe/util/TaskManager.java +++ b/core/src/main/java/com/boydti/fawe/util/TaskManager.java @@ -410,7 +410,7 @@ public abstract class TaskManager { } } }; - TaskManager.IMP.task(run); + SetQueue.IMP.addTask(run); try { synchronized (function) { while (running.get()) {