Skip to content

Commit

Permalink
ref: changed Executor
Browse files Browse the repository at this point in the history
  • Loading branch information
Uhutown committed Oct 19, 2023
1 parent 7fa5f28 commit a92f507
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@

public final class NameHandler implements INetworkSync {

private static ExecutorService WRITE_SERVICE = Executors.newFixedThreadPool(4);
private static ExecutorService READ_SERVICE = Executors.newFixedThreadPool(20);
private static ExecutorService WRITE_SERVICE = Executors.newFixedThreadPool(5);
private static ExecutorService READ_SERVICE = Executors.newCachedThreadPool();
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,8 +66,8 @@ public static void onServerStop(final FMLServerStoppingEvent event) {
} catch (final InterruptedException e) {
e.printStackTrace();
}
READ_SERVICE = Executors.newFixedThreadPool(20);
WRITE_SERVICE = Executors.newFixedThreadPool(4);
READ_SERVICE = Executors.newCachedThreadPool();
WRITE_SERVICE = Executors.newFixedThreadPool(5);
}

public static void registerToNetworkChannel(final Object obj) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ public final class SignalStateHandler implements INetworkSync {
private SignalStateHandler() {
}

private static ExecutorService READ_SERVICE = Executors.newFixedThreadPool(20);
private static ExecutorService WRITE_SERVICE = Executors.newFixedThreadPool(4);
private static ExecutorService READ_SERVICE = Executors.newCachedThreadPool();
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<>();
private static final Map<SignalStateInfo, List<LoadHolder<?>>> SIGNAL_COUNTER = new HashMap<>();
Expand All @@ -76,8 +76,8 @@ public static void onServerStop(final FMLServerStoppingEvent event) {
} catch (final InterruptedException e) {
e.printStackTrace();
}
READ_SERVICE = Executors.newFixedThreadPool(20);
WRITE_SERVICE = Executors.newFixedThreadPool(4);
READ_SERVICE = Executors.newCachedThreadPool();
WRITE_SERVICE = Executors.newFixedThreadPool(5);
}

public static void createStates(final SignalStateInfo info,
Expand Down

0 comments on commit a92f507

Please sign in to comment.