improve priority task picker task counting

This commit is contained in:
James Seibel
2026-02-05 07:40:34 -06:00
parent 2a681ef8e6
commit ba32af2c58
@@ -310,11 +310,7 @@ public class PriorityTaskPicker
public void remove(@NotNull Runnable command) { this.taskQueue.removeIf(trackedRunnable -> trackedRunnable.command == command); }
public void runTask(@NotNull Runnable command)
{
this.threadPoolExecutor.execute(command);
this.runningTasksRef.getAndIncrement();
}
public void runTask(@NotNull Runnable command) { this.threadPoolExecutor.execute(command); }
public int getQueueSize() { return this.taskQueue.size(); }
@@ -457,6 +453,8 @@ public class PriorityTaskPicker
@Override
public void run()
{
this.executor.runningTasksRef.getAndIncrement();
long startTime = System.nanoTime();
try
{