Separate the create and start phases in DelayedTaskManager

Desktop / Chromium - fdoray [chromium.org] - 20 April 2017 09:13 EDT

Tasks added to the DelayedTaskManager before Start() are sent to the service thread when Start() is called. Tasks added to the DelayedTaskManager after Start() are sent to the service thread as they are added. The service thread calls the post task callback of a task when it becomes ripe for execution.

BUG=690706

Review-Url: https://codereview.chromium.org/2810873008 Cr-Commit-Position: refs/heads/master@{#465988}

840441c Separate the create and start phases in DelayedTaskManager.
base/task_scheduler/delayed_task_manager.cc | 68 +++++++--
base/task_scheduler/delayed_task_manager.h | 54 ++++++--
.../delayed_task_manager_unittest.cc | 153 +++++++++++++++------
...r_single_thread_task_runner_manager_unittest.cc | 8 +-
.../scheduler_worker_pool_impl_unittest.cc | 17 ++-
base/task_scheduler/task_scheduler_impl.cc | 23 ++--
base/task_scheduler/task_scheduler_impl.h | 10 +-
7 files changed, 238 insertions(+), 95 deletions(-)

Upstream: git.chromium.org


  • Share