SchedulerWorker: Do not go back to sleep after cleanup.

At first sight this is merely a correctness fix to avoid sleeping twice.

But it is also a prerequisite to fix crbug.com/810464 as calling
WaitForWork() after cleanup (which may occur as part of GetWork())
is not safe.

This may also help timing flakes on reclaim tests for which the typical
resolution wait is 3X the reclaim time (but was only 1.5X in practice
because of this bug).

R=fdoray@chromium.org, robliao@chromium.org

Bug: 810464
Change-Id: I5e00de763f95773120022d258a513bb19a30c6b1
Reviewed-on: https://chromium-review.googlesource.com/931541
Reviewed-by: François Doray <fdoray@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538712}

CrOS-Libchrome-Original-Commit: d5b04e7e34dac974c7d6ce4b138f66419fca0ca9
1 file changed
tree: 624a3619845249091f9063ce9676ed95655ac722
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/