mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Shuwdown executors after executing all tasks.
Bug: 14113276 Change-Id: Ie42ef30ffe5767ca434db4669efad2027b474e74
This commit is contained in:
parent
ba635ad30d
commit
b21edc4402
@ -47,8 +47,13 @@ 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.shutdown();
|
executor.execute(new Runnable() {
|
||||||
sExecutorMap.remove(executor);
|
@Override
|
||||||
|
public void run() {
|
||||||
|
executor.shutdown();
|
||||||
|
sExecutorMap.remove(executor);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user