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,9 +47,14 @@ public class ExecutorUtils {
|
||||||
public static void shutdownAllExecutors() {
|
public static void shutdownAllExecutors() {
|
||||||
synchronized(sExecutorMap) {
|
synchronized(sExecutorMap) {
|
||||||
for (final PrioritizedSerialExecutor executor : sExecutorMap.values()) {
|
for (final PrioritizedSerialExecutor executor : sExecutorMap.values()) {
|
||||||
|
executor.execute(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
executor.shutdown();
|
executor.shutdown();
|
||||||
sExecutorMap.remove(executor);
|
sExecutorMap.remove(executor);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue