am b21edc44
: Shuwdown executors after executing all tasks.
* commit 'b21edc44026bac1a41cbf01aa4476c5cdf2a1812': Shuwdown executors after executing all tasks.
This commit is contained in:
commit
1298fe4f38
1 changed files with 7 additions and 2 deletions
|
@ -47,8 +47,13 @@ public class ExecutorUtils {
|
|||
public static void shutdownAllExecutors() {
|
||||
synchronized(sExecutorMap) {
|
||||
for (final PrioritizedSerialExecutor executor : sExecutorMap.values()) {
|
||||
executor.shutdown();
|
||||
sExecutorMap.remove(executor);
|
||||
executor.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
executor.shutdown();
|
||||
sExecutorMap.remove(executor);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue