Fix race-condition in SchedulerSingleThreadTaskRunnerManager::Start().

SchedulerSingleThreadTaskRunnerManager allows SingleThreadTaskRunners to
be created and tasks posted to them before the worker threads are
actually started. The call to Start() the required workers was calling
both Start() and WakeUp() on each of them, the latter being unnecessary
since if a worker needs to process work then it must already have been
woken, when the work was PostTask()d into it.

Besides removing an unnecessary wake-up, this resolves a subtle race-
condition between wake-up and a potential worker clean-up (see bug).

Bug: 862582
Change-Id: I9c4246cec4b1bda6d728e5e1656bb2c5ca7c0f0a
Reviewed-on: https://chromium-review.googlesource.com/1133279
Commit-Queue: Wez <wez@chromium.org>
Reviewed-by: Robert Liao <robliao@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574681}
1 file changed