Skip to content

Commit

Permalink
ref: changed from CacheThreadPool to FixedThreadPool
Browse files Browse the repository at this point in the history
  • Loading branch information
Uhutown committed Oct 19, 2023
1 parent f290a56 commit 8887a61
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<StateInfo, String> ALL_NAMES = new HashMap<>();
private static final Map<World, NameHandlerFile> ALL_LEVEL_FILES = new HashMap<>();
private static final Map<StateInfo, Integer> LOAD_COUNTER = new HashMap<>();
Expand All @@ -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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<SignalStateInfo, Map<SEProperty, String>> CURRENTLY_LOADED_STATES = new HashMap<>();
private static final Map<World, SignalStateFile> ALL_LEVEL_FILES = new HashMap<>();
Expand All @@ -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);
}

Expand Down

0 comments on commit 8887a61

Please sign in to comment.