Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Issue 2834063002: Separate the create and start phases in TaskSchedulerImpl. (Closed)

Created:
3 years, 8 months ago by fdoray
Modified:
3 years, 8 months ago
Reviewers:
robliao, gab
CC:
chromium-reviews, gab+watch_chromium.org, robliao+watch_chromium.org, fdoray+watch_chromium.org, danakj+watch_chromium.org, vmpstr+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Separate the create and start phases in TaskSchedulerImpl. The task scheduler doesn't create threads before Start() is called. Tasks can be posted before Start(), but they don't run right away. Tasks can only run once Start() has been called. BUG=690706 Review-Url: https://codereview.chromium.org/2834063002 Cr-Commit-Position: refs/heads/master@{#467117} Committed: https://chromium.googlesource.com/chromium/src/+/0f358eedd390d9c0017ec60ff95c51cfa07d60a5

Patch Set 1 #

Patch Set 2 : self-review #

Patch Set 3 : rebase #

Patch Set 4 : unique_ptr #

Patch Set 5 : self-review #

Total comments: 27

Patch Set 6 : CR-robliao-gab-17-20 #

Patch Set 7 : CR-robliao-25-grammar #

Unified diffs Side-by-side diffs Delta from patch set Stats (+200 lines, -130 lines) Patch
M base/task_scheduler/scheduler_worker_pool_impl.h View 1 2 3 4 5 1 chunk +7 lines, -4 lines 0 comments Download
M base/task_scheduler/task_scheduler.h View 1 2 3 4 5 6 2 chunks +14 lines, -3 lines 0 comments Download
M base/task_scheduler/task_scheduler.cc View 2 chunks +3 lines, -1 line 0 comments Download
M base/task_scheduler/task_scheduler_impl.h View 1 2 3 4 5 2 chunks +3 lines, -12 lines 0 comments Download
M base/task_scheduler/task_scheduler_impl.cc View 1 2 3 4 5 3 chunks +57 lines, -77 lines 0 comments Download
M base/task_scheduler/task_scheduler_impl_unittest.cc View 1 2 3 4 5 10 chunks +108 lines, -33 lines 0 comments Download
M base/test/scoped_task_scheduler.cc View 1 2 3 4 5 3 chunks +8 lines, -0 lines 0 comments Download

Messages

Total messages: 38 (27 generated)
fdoray
PTAL
3 years, 8 months ago (2017-04-24 17:05:29 UTC) #16
robliao
Overall approach lg. https://codereview.chromium.org/2834063002/diff/80001/base/task_scheduler/scheduler_worker_pool_impl.h File base/task_scheduler/scheduler_worker_pool_impl.h (right): https://codereview.chromium.org/2834063002/diff/80001/base/task_scheduler/scheduler_worker_pool_impl.h#newcode43 base/task_scheduler/scheduler_worker_pool_impl.h:43: // The pool doesn't create threads ...
3 years, 8 months ago (2017-04-24 22:32:19 UTC) #17
gab
Nice :) https://codereview.chromium.org/2834063002/diff/80001/base/task_scheduler/task_scheduler.h File base/task_scheduler/task_scheduler.h (right): https://codereview.chromium.org/2834063002/diff/80001/base/task_scheduler/task_scheduler.h#newcode44 base/task_scheduler/task_scheduler.h:44: // Note: all base/task_scheduler users should go ...
3 years, 8 months ago (2017-04-25 15:16:15 UTC) #18
gab
https://codereview.chromium.org/2834063002/diff/80001/base/task_scheduler/task_scheduler.h File base/task_scheduler/task_scheduler.h (right): https://codereview.chromium.org/2834063002/diff/80001/base/task_scheduler/task_scheduler.h#newcode159 base/task_scheduler/task_scheduler.h:159: // (ensures isolation). Actually, this is the API that ...
3 years, 8 months ago (2017-04-25 15:20:01 UTC) #19
gab
https://codereview.chromium.org/2834063002/diff/80001/base/task_scheduler/task_scheduler.h File base/task_scheduler/task_scheduler.h (right): https://codereview.chromium.org/2834063002/diff/80001/base/task_scheduler/task_scheduler.h#newcode159 base/task_scheduler/task_scheduler.h:159: // (ensures isolation). On 2017/04/25 15:20:01, gab wrote: > ...
3 years, 8 months ago (2017-04-25 15:21:11 UTC) #20
robliao
https://codereview.chromium.org/2834063002/diff/80001/base/task_scheduler/task_scheduler.h File base/task_scheduler/task_scheduler.h (right): https://codereview.chromium.org/2834063002/diff/80001/base/task_scheduler/task_scheduler.h#newcode44 base/task_scheduler/task_scheduler.h:44: // Note: all base/task_scheduler users should go through post_task.h ...
3 years, 8 months ago (2017-04-25 17:37:28 UTC) #25
fdoray
PTAnL https://codereview.chromium.org/2834063002/diff/80001/base/task_scheduler/scheduler_worker_pool_impl.h File base/task_scheduler/scheduler_worker_pool_impl.h (right): https://codereview.chromium.org/2834063002/diff/80001/base/task_scheduler/scheduler_worker_pool_impl.h#newcode43 base/task_scheduler/scheduler_worker_pool_impl.h:43: // The pool doesn't create threads before Start() ...
3 years, 8 months ago (2017-04-25 18:43:35 UTC) #27
gab
lgtm
3 years, 8 months ago (2017-04-25 18:47:15 UTC) #29
robliao
lgtm! Thanks.
3 years, 8 months ago (2017-04-25 20:15:06 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2834063002/120001
3 years, 8 months ago (2017-04-25 21:17:07 UTC) #35
commit-bot: I haz the power
3 years, 8 months ago (2017-04-25 21:22:42 UTC) #38
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/0f358eedd390d9c0017ec60ff95c...

Powered by Google App Engine
This is Rietveld 408576698