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

Issue 2709163006: Update TaskScheduler docs to make it more obvious how a TaskScheduler should be put in place. (Closed)

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

Description

Update TaskScheduler docs to make it more obvious how a TaskScheduler should be put in place. In particular: - Move mention of TaskScheduler::SetInstance() into a lower prerequisite section (too reduce instances of people going crazy with if (!GetInstance()) SetInstance()...) - Add DCHECKs that reference the Prerequisite section. - Add mentions of base::test::ScopedTaskScheduler in key places (to increase discovery of it for people new to TaskScheduler) - Make it clear users shouldn't generally use GetInstance() to know if they need to SetInstance() before PostTask() -- give people a generic bool, they'll use it (e.g. TaskRunner::PostTask(), sigh..!) ;) BUG=553459 Review-Url: https://codereview.chromium.org/2709163006 Cr-Commit-Position: refs/heads/master@{#452872} Committed: https://chromium.googlesource.com/chromium/src/+/4fe88c1ecfef251dd03a5965e35df69f80a6bf84

Patch Set 1 #

Total comments: 6

Patch Set 2 : tweaks #

Total comments: 4

Patch Set 3 : review:fdoray #

Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -10 lines) Patch
M base/task_scheduler/post_task.h View 1 2 chunks +7 lines, -3 lines 0 comments Download
M base/task_scheduler/post_task.cc View 3 chunks +9 lines, -0 lines 0 comments Download
M base/task_scheduler/task_scheduler.h View 1 2 1 chunk +17 lines, -6 lines 0 comments Download
M base/task_scheduler/task_traits.h View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 24 (15 generated)
gab
PTaL, we discussed this a few times offline and I just saw this again (someone ...
3 years, 10 months ago (2017-02-23 21:23:58 UTC) #3
robliao
NOTRY=true intentional? There are code changes. https://codereview.chromium.org/2709163006/diff/1/base/task_scheduler/post_task.cc File base/task_scheduler/post_task.cc (right): https://codereview.chromium.org/2709163006/diff/1/base/task_scheduler/post_task.cc#newcode63 base/task_scheduler/post_task.cc:63: << "Ref. Prerequisite ...
3 years, 10 months ago (2017-02-23 23:00:33 UTC) #4
gab
On 2017/02/23 23:00:33, robliao wrote: > NOTRY=true intentional? There are code changes. It was but ...
3 years, 10 months ago (2017-02-23 23:39:58 UTC) #6
robliao
lgtm! Thanks!
3 years, 10 months ago (2017-02-24 00:06:49 UTC) #13
fdoray
lgtm https://codereview.chromium.org/2709163006/diff/20001/base/task_scheduler/task_scheduler.h File base/task_scheduler/task_scheduler.h (right): https://codereview.chromium.org/2709163006/diff/20001/base/task_scheduler/task_scheduler.h#newcode118 base/task_scheduler/task_scheduler.h:118: // of the worker pool in which a ...
3 years, 10 months ago (2017-02-24 16:53:37 UTC) #16
fdoray
lgtm https://codereview.chromium.org/2709163006/diff/20001/base/task_scheduler/task_scheduler.h File base/task_scheduler/task_scheduler.h (right): https://codereview.chromium.org/2709163006/diff/20001/base/task_scheduler/task_scheduler.h#newcode118 base/task_scheduler/task_scheduler.h:118: // of the worker pool in which a ...
3 years, 10 months ago (2017-02-24 16:53:37 UTC) #17
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/2709163006/40001
3 years, 10 months ago (2017-02-24 17:02:33 UTC) #20
gab
Thanks, done. https://codereview.chromium.org/2709163006/diff/20001/base/task_scheduler/task_scheduler.h File base/task_scheduler/task_scheduler.h (right): https://codereview.chromium.org/2709163006/diff/20001/base/task_scheduler/task_scheduler.h#newcode118 base/task_scheduler/task_scheduler.h:118: // of the worker pool in which ...
3 years, 10 months ago (2017-02-24 17:07:22 UTC) #21
commit-bot: I haz the power
3 years, 10 months ago (2017-02-24 18:12:04 UTC) #24
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/4fe88c1ecfef251dd03a5965e35d...

Powered by Google App Engine
This is Rietveld 408576698