am b21edc44: Shuwdown executors after executing all tasks.

* commit 'b21edc44026bac1a41cbf01aa4476c5cdf2a1812':
  Shuwdown executors after executing all tasks.
This commit is contained in:
Keisuke Kuroyanagi 2014-04-17 01:06:28 +00:00 committed by Android Git Automerger
commit 1298fe4f38

View file

@ -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);
}
});
}
}
}