fix: not shutting down executor service after game launched.
This commit is contained in:
@@ -288,12 +288,14 @@ public class CancellableTaskExecutor extends TaskExecutor {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
String oldName = Thread.currentThread().getName();
|
||||
try {
|
||||
if (task.getName() != null)
|
||||
Thread.currentThread().setName(task.getName());
|
||||
if (!executeTask(parentTask, task))
|
||||
success.set(false);
|
||||
} finally {
|
||||
Thread.currentThread().setName(oldName);
|
||||
latch.countDown();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,10 +74,10 @@ public final class Schedulers {
|
||||
Logging.LOG.info("Shutting down executor services.");
|
||||
|
||||
if (CACHED_EXECUTOR != null)
|
||||
CACHED_EXECUTOR.shutdownNow();
|
||||
CACHED_EXECUTOR.shutdown();
|
||||
|
||||
if (IO_EXECUTOR != null)
|
||||
IO_EXECUTOR.shutdownNow();
|
||||
IO_EXECUTOR.shutdown();
|
||||
}
|
||||
|
||||
public static Future<?> schedule(Executor executor, Runnable command) {
|
||||
|
||||
Reference in New Issue
Block a user