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

Issue 1862113002: TaskScheduler: Don't use a callback to post a task from TaskTracker. (Closed)

Created:
4 years, 8 months ago by fdoray
Modified:
4 years, 8 months ago
Reviewers:
danakj, robliao, gab
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

TaskScheduler: Don't use a callback to post a task from TaskTracker. Replace the existing TaskTracker::PostTask() method (which runs a callback when it allows a task to be posted) with a TaskTracker::WillPostTask() method (which returns true when it allows a task to be posted). The caller is responsible for posting the task when the new method returns true. BUG=553459 Committed: https://crrev.com/7eef862850afcd443ea44fdebeb286b2b35d4ca2 Cr-Commit-Position: refs/heads/master@{#386072}

Patch Set 1 #

Total comments: 9

Patch Set 2 : CR danakj/robliao #3-4 (fix comments) #

Total comments: 7

Patch Set 3 : CR gab #6 (clarify WillPostTask comment) #

Patch Set 4 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+73 lines, -112 lines) Patch
M base/task_scheduler/scheduler_worker_thread_unittest.cc View 1 2 3 1 chunk +6 lines, -6 lines 0 comments Download
M base/task_scheduler/task_tracker.h View 1 2 2 chunks +9 lines, -12 lines 0 comments Download
M base/task_scheduler/task_tracker.cc View 1 chunk +3 lines, -6 lines 0 comments Download
M base/task_scheduler/task_tracker_unittest.cc View 1 8 chunks +55 lines, -88 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 23 (9 generated)
fdoray
danakj@: Can you review this CL? Thanks.
4 years, 8 months ago (2016-04-06 19:32:20 UTC) #2
danakj
LGTM https://codereview.chromium.org/1862113002/diff/1/base/task_scheduler/task_tracker_unittest.cc File base/task_scheduler/task_tracker_unittest.cc (right): https://codereview.chromium.org/1862113002/diff/1/base/task_scheduler/task_tracker_unittest.cc#newcode132 base/task_scheduler/task_tracker_unittest.cc:132: // Post the task. update comment https://codereview.chromium.org/1862113002/diff/1/base/task_scheduler/task_tracker_unittest.cc#newcode177 base/task_scheduler/task_tracker_unittest.cc:177: ...
4 years, 8 months ago (2016-04-06 19:38:30 UTC) #3
robliao
lgtm + comments https://codereview.chromium.org/1862113002/diff/1/base/task_scheduler/task_tracker_unittest.cc File base/task_scheduler/task_tracker_unittest.cc (right): https://codereview.chromium.org/1862113002/diff/1/base/task_scheduler/task_tracker_unittest.cc#newcode132 base/task_scheduler/task_tracker_unittest.cc:132: // Post the task. On 2016/04/06 ...
4 years, 8 months ago (2016-04-06 19:42:33 UTC) #4
fdoray
All done. I'll wait until https://codereview.chromium.org/1708773002/ is LGTMed to land this CL. https://codereview.chromium.org/1862113002/diff/1/base/task_scheduler/task_tracker_unittest.cc File base/task_scheduler/task_tracker_unittest.cc ...
4 years, 8 months ago (2016-04-06 20:59:27 UTC) #5
gab
lgtm w/ nits Not a fan of having half of the API be notification based ...
4 years, 8 months ago (2016-04-07 17:05:18 UTC) #6
fdoray
gab@: Done. https://codereview.chromium.org/1862113002/diff/20001/base/task_scheduler/task_tracker.cc File base/task_scheduler/task_tracker.cc (right): https://codereview.chromium.org/1862113002/diff/20001/base/task_scheduler/task_tracker.cc#newcode68 base/task_scheduler/task_tracker.cc:68: task_annotator.DidQueueTask(kQueueFunctionName, *task); On 2016/04/07 17:05:18, gab wrote: ...
4 years, 8 months ago (2016-04-07 18:05:58 UTC) #7
gab
lgtm++ https://codereview.chromium.org/1862113002/diff/20001/base/task_scheduler/task_tracker.cc File base/task_scheduler/task_tracker.cc (right): https://codereview.chromium.org/1862113002/diff/20001/base/task_scheduler/task_tracker.cc#newcode73 base/task_scheduler/task_tracker.cc:73: void TaskTracker::RunTask(const Task* task) { On 2016/04/07 18:05:58, ...
4 years, 8 months ago (2016-04-07 18:58:57 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1862113002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1862113002/40001
4 years, 8 months ago (2016-04-08 01:03:50 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_gn on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_gn/builds/16018) ios_rel_device_ninja on tryserver.chromium.mac (JOB_FAILED, ...
4 years, 8 months ago (2016-04-08 01:06:56 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1862113002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1862113002/60001
4 years, 8 months ago (2016-04-08 01:39:16 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/156456) ios_rel_device_gn on tryserver.chromium.mac (JOB_FAILED, ...
4 years, 8 months ago (2016-04-08 01:44:55 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1862113002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1862113002/60001
4 years, 8 months ago (2016-04-08 14:23:39 UTC) #20
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 8 months ago (2016-04-08 14:51:57 UTC) #21
commit-bot: I haz the power
4 years, 8 months ago (2016-04-08 14:53:21 UTC) #23
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/7eef862850afcd443ea44fdebeb286b2b35d4ca2
Cr-Commit-Position: refs/heads/master@{#386072}

Powered by Google App Engine
This is Rietveld 408576698