Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b21edc44 authored by Keisuke Kuroyanagi's avatar Keisuke Kuroyanagi
Browse files

Shuwdown executors after executing all tasks.

Bug: 14113276
Change-Id: Ie42ef30ffe5767ca434db4669efad2027b474e74
parent ba635ad3
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -47,9 +47,14 @@ public class ExecutorUtils {
    public static void shutdownAllExecutors() {
        synchronized(sExecutorMap) {
            for (final PrioritizedSerialExecutor executor : sExecutorMap.values()) {
                executor.execute(new Runnable() {
                    @Override
                    public void run() {
                        executor.shutdown();
                        sExecutorMap.remove(executor);
                    }
                });
            }
        }
    }
}