diff options
Diffstat (limited to 'dalvik/src')
-rw-r--r-- | dalvik/src/main/java/dalvik/system/ZygoteHooks.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/dalvik/src/main/java/dalvik/system/ZygoteHooks.java b/dalvik/src/main/java/dalvik/system/ZygoteHooks.java index 59d8820..134c2f4 100644 --- a/dalvik/src/main/java/dalvik/system/ZygoteHooks.java +++ b/dalvik/src/main/java/dalvik/system/ZygoteHooks.java @@ -70,13 +70,10 @@ public final class ZygoteHooks { */ private static void waitUntilAllThreadsStopped() { File tasks = new File("/proc/self/task"); + // All Java daemons are stopped already. We're just waiting for their OS counterparts to + // finish as well. This shouldn't take much time so spinning is ok here. while (tasks.list().length > 1) { - try { - // Experimentally, booting and playing about with a stingray, I never saw us - // go round this loop more than once with a 10ms sleep. - Thread.sleep(10); - } catch (InterruptedException ignored) { - } + Thread.yield(); } } } |