diff --git a/src/main/java/me/cortex/voxy/common/thread/ServiceSlice.java b/src/main/java/me/cortex/voxy/common/thread/ServiceSlice.java index ad551a86..6e185a02 100644 --- a/src/main/java/me/cortex/voxy/common/thread/ServiceSlice.java +++ b/src/main/java/me/cortex/voxy/common/thread/ServiceSlice.java @@ -13,7 +13,7 @@ import java.util.function.BooleanSupplier; import java.util.function.Supplier; public class ServiceSlice extends TrackedObject { - private final String name; + final String name; final int weightPerJob; volatile boolean alive = true; private final ServiceThreadPool threadPool; diff --git a/src/main/java/me/cortex/voxy/common/thread/ServiceThreadPool.java b/src/main/java/me/cortex/voxy/common/thread/ServiceThreadPool.java index 340983cd..39f66e06 100644 --- a/src/main/java/me/cortex/voxy/common/thread/ServiceThreadPool.java +++ b/src/main/java/me/cortex/voxy/common/thread/ServiceThreadPool.java @@ -3,6 +3,7 @@ package me.cortex.voxy.common.thread; import me.cortex.voxy.common.Logger; import me.cortex.voxy.common.util.Pair; +import java.util.Arrays; import java.util.concurrent.Semaphore; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicLong; @@ -204,7 +205,11 @@ public class ServiceThreadPool { public void shutdown() { if (this.serviceSlices.length != 0) { - throw new IllegalStateException("All service slices must be shutdown before thread pool can exit"); + String remaining = ""; + for (var service : this.serviceSlices) { + remaining += service.name + ", "; + } + throw new IllegalStateException("All service slices must be shutdown before thread pool can exit. Remaining: " + remaining); } //Wait for the tasks to finish