diff --git a/src/main/java/com/troblecodings/signals/handler/NameHandler.java b/src/main/java/com/troblecodings/signals/handler/NameHandler.java index 9cf028ebd..23e206740 100644 --- a/src/main/java/com/troblecodings/signals/handler/NameHandler.java +++ b/src/main/java/com/troblecodings/signals/handler/NameHandler.java @@ -44,7 +44,7 @@ public final class NameHandler implements INetworkSync { private static ExecutorService WRITE_SERVICE = Executors.newFixedThreadPool(5); - private static ExecutorService READ_SERVICE = Executors.newCachedThreadPool(); + private static ExecutorService READ_SERVICE = Executors.newFixedThreadPool(14); private static final Map ALL_NAMES = new HashMap<>(); private static final Map ALL_LEVEL_FILES = new HashMap<>(); private static final Map LOAD_COUNTER = new HashMap<>(); @@ -66,7 +66,7 @@ public static void onServerStop(final FMLServerStoppingEvent event) { } catch (final InterruptedException e) { e.printStackTrace(); } - READ_SERVICE = Executors.newCachedThreadPool(); + READ_SERVICE = Executors.newFixedThreadPool(14); WRITE_SERVICE = Executors.newFixedThreadPool(5); } diff --git a/src/main/java/com/troblecodings/signals/handler/SignalStateHandler.java b/src/main/java/com/troblecodings/signals/handler/SignalStateHandler.java index 3d8983b88..33cd9b0e9 100644 --- a/src/main/java/com/troblecodings/signals/handler/SignalStateHandler.java +++ b/src/main/java/com/troblecodings/signals/handler/SignalStateHandler.java @@ -50,7 +50,7 @@ public final class SignalStateHandler implements INetworkSync { private SignalStateHandler() { } - private static ExecutorService READ_SERVICE = Executors.newCachedThreadPool(); + private static ExecutorService READ_SERVICE = Executors.newFixedThreadPool(14); private static ExecutorService WRITE_SERVICE = Executors.newFixedThreadPool(5); private static final Map> CURRENTLY_LOADED_STATES = new HashMap<>(); private static final Map ALL_LEVEL_FILES = new HashMap<>(); @@ -76,7 +76,7 @@ public static void onServerStop(final FMLServerStoppingEvent event) { } catch (final InterruptedException e) { e.printStackTrace(); } - READ_SERVICE = Executors.newCachedThreadPool(); + READ_SERVICE = Executors.newFixedThreadPool(14); WRITE_SERVICE = Executors.newFixedThreadPool(5); }