- Reverting r34697 for now, it breaks Developer Mode (functionality like Add Card To Hand, Add Card To Play, Setup Game State, etc.) and thus hinders proper debugging of the game in specific situations.

- Please feel free to revert this commit to continue working on the single thread executor project and then recommit once it no longer breaks dev mode.
This commit is contained in:
Agetian
2017-07-11 06:41:21 +00:00
parent aa974352c5
commit b69b6f1097
3 changed files with 5 additions and 38 deletions

View File

@@ -20,10 +20,8 @@ public class ThreadUtil {
}
}
// Use a single game thread, rather than a pool of them, because when something
// needs to execute on the game thread, it's because it's not thread safe.
private final static ExecutorService gameThread = Executors.newSingleThreadExecutor(new WorkerThreadFactory("Game"));
private static ExecutorService getGameThreadPool() { return gameThread; }
private final static ExecutorService gameThreadPool = Executors.newCachedThreadPool(new WorkerThreadFactory("Game"));
private static ExecutorService getGameThreadPool() { return gameThreadPool; }
private final static ScheduledExecutorService scheduledPool = Executors.newScheduledThreadPool(2, new WorkerThreadFactory("Delayed"));
private static ScheduledExecutorService getScheduledPool() { return scheduledPool; }