Try to fix RejectedExecutionException on OSX

This commit is contained in:
huangyuhui 2016-02-25 13:24:23 +08:00
parent 89fcf4526c
commit 892d8fe09c

View File

@ -95,7 +95,8 @@ public class TaskList extends Thread {
t2.setParallelExecuting(true);
Invoker thread = new Invoker(t2, runningThread);
runningThread.add(thread);
EXECUTOR_SERVICE.execute(thread);
if (!EXECUTOR_SERVICE.isTerminated())
EXECUTOR_SERVICE.execute(thread);
}
while (!runningThread.isEmpty())
try {