Rewriting logic in finally block of PooledTaskRunner to avoid using a
return statement
This commit is contained in:
Christopher L. Shannon (cshannon) 2016-09-23 07:50:12 -04:00
parent d4c7cce7d7
commit f25e7ab47f
1 changed files with 9 additions and 10 deletions

View File

@ -142,9 +142,7 @@ class PooledTaskRunner implements TaskRunner {
if (shutdown) { if (shutdown) {
queued = false; queued = false;
runable.notifyAll(); runable.notifyAll();
return; } else {
}
// If we could not iterate all the items // If we could not iterate all the items
// then we need to re-queue. // then we need to re-queue.
if (!done) { if (!done) {
@ -154,6 +152,7 @@ class PooledTaskRunner implements TaskRunner {
if (queued) { if (queued) {
executor.execute(runable); executor.execute(runable);
} }
}
} }
} }