commit | 291f0a739f2c952d402f76d3750b9a2340269c18 | [log] [tgz] |
---|---|---|
author | Wez <wez@chromium.org> | Thu Jul 12 19:42:09 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Jul 12 19:42:09 2018 |
tree | 006f9faba9a28942d09cefac174ad67fdb68ea75 | |
parent | 7b520e5b526c4e1ed0a2344a79e42eb6fcf5c298 [diff] |
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}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .