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

Issue 2531663003: TaskScheduler: Add TaskTraits::WithWait(). (Closed)

Created:
4 years ago by fdoray
Modified:
4 years ago
Reviewers:
robliao, danakj, gab
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

TaskScheduler: Add TaskTraits::WithWait(). WithWait() tasks are allowed to wait on other things than file I/O. In particular, they may wait on a WaitableEvent or a ConditionVariable, join a thread or a process, or make a blocking system call that doesn't involve interactions with the file system. In upcoming CLs, this trait will be used in scheduling decisions (more details on the bug). BUG=669247 Committed: https://crrev.com/19509c12031a760169479b34fe6408a093b71900 Cr-Commit-Position: refs/heads/master@{#435054}

Patch Set 1 #

Patch Set 2 : CR gab #3 (enforce AssertWaitAllowed requires WithWait) #

Total comments: 6

Patch Set 3 : CR robliao #9 (wording, order of ThreadRestrictions reset) #

Total comments: 2

Patch Set 4 : CR danakj #14 (no TEST_P) #

Total comments: 4

Patch Set 5 : rebase #

Patch Set 6 : CR danakj #22 (TEST_F -> TEST) #

Patch Set 7 : CR danakj #22 (AssertWaitAllowed) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+86 lines, -11 lines) Patch
M base/task_scheduler/scheduler_worker_pool_impl_unittest.cc View 1 2 3 4 4 chunks +10 lines, -7 lines 0 comments Download
M base/task_scheduler/task_tracker.cc View 1 2 3 4 2 chunks +5 lines, -0 lines 0 comments Download
M base/task_scheduler/task_tracker_unittest.cc View 1 2 3 4 5 6 2 chunks +50 lines, -1 line 0 comments Download
M base/task_scheduler/task_traits.h View 1 2 2 chunks +13 lines, -2 lines 0 comments Download
M base/task_scheduler/task_traits.cc View 2 chunks +6 lines, -0 lines 0 comments Download
M base/threading/sequenced_worker_pool.cc View 1 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 33 (17 generated)
fdoray
PTAL
4 years ago (2016-11-25 14:56:48 UTC) #2
gab
Don't we want to also enforce this in this CL? (otherwise the CL that tries ...
4 years ago (2016-11-28 16:24:07 UTC) #3
fdoray
PTAnL
4 years ago (2016-11-28 19:41:43 UTC) #5
gab
lgtm
4 years ago (2016-11-28 19:56:22 UTC) #8
robliao
lgtm + nits. https://codereview.chromium.org/2531663003/diff/20001/base/task_scheduler/task_tracker.cc File base/task_scheduler/task_tracker.cc (right): https://codereview.chromium.org/2531663003/diff/20001/base/task_scheduler/task_tracker.cc#newcode268 base/task_scheduler/task_tracker.cc:268: ThreadRestrictions::SetWaitAllowed(previous_wait_allowed); Nit: Order above SetIOAllowed for ...
4 years ago (2016-11-28 20:09:50 UTC) #9
fdoray
danakj@: PTAL https://codereview.chromium.org/2531663003/diff/20001/base/task_scheduler/task_tracker.cc File base/task_scheduler/task_tracker.cc (right): https://codereview.chromium.org/2531663003/diff/20001/base/task_scheduler/task_tracker.cc#newcode268 base/task_scheduler/task_tracker.cc:268: ThreadRestrictions::SetWaitAllowed(previous_wait_allowed); On 2016/11/28 20:09:50, robliao wrote: > ...
4 years ago (2016-11-28 21:47:51 UTC) #12
danakj
I don't see at a high level why we want this. Will we schedule things ...
4 years ago (2016-11-28 21:59:16 UTC) #14
fdoray
On 2016/11/28 21:59:16, danakj wrote: > I don't see at a high level why we ...
4 years ago (2016-11-28 22:33:06 UTC) #17
danakj
On Mon, Nov 28, 2016 at 2:33 PM, <fdoray@chromium.org> wrote: > On 2016/11/28 21:59:16, danakj ...
4 years ago (2016-11-28 22:36:45 UTC) #18
fdoray
https://codereview.chromium.org/2531663003/diff/40001/base/task_scheduler/task_tracker_unittest.cc File base/task_scheduler/task_tracker_unittest.cc (right): https://codereview.chromium.org/2531663003/diff/40001/base/task_scheduler/task_tracker_unittest.cc#newcode498 base/task_scheduler/task_tracker_unittest.cc:498: const TaskShutdownBehavior shutdown_behavior_; On 2016/11/28 21:59:16, danakj wrote: > ...
4 years ago (2016-11-28 22:44:27 UTC) #19
fdoray
On 2016/11/28 22:36:45, danakj wrote: > On Mon, Nov 28, 2016 at 2:33 PM, <mailto:fdoray@chromium.org> ...
4 years ago (2016-11-28 22:49:03 UTC) #21
danakj
LGTM https://codereview.chromium.org/2531663003/diff/60001/base/task_scheduler/task_tracker_unittest.cc File base/task_scheduler/task_tracker_unittest.cc (right): https://codereview.chromium.org/2531663003/diff/60001/base/task_scheduler/task_tracker_unittest.cc#newcode845 base/task_scheduler/task_tracker_unittest.cc:845: // Waiting is allowed by default. Expect TaskTracker ...
4 years ago (2016-11-28 23:01:30 UTC) #22
fdoray
https://codereview.chromium.org/2531663003/diff/60001/base/task_scheduler/task_tracker_unittest.cc File base/task_scheduler/task_tracker_unittest.cc (right): https://codereview.chromium.org/2531663003/diff/60001/base/task_scheduler/task_tracker_unittest.cc#newcode845 base/task_scheduler/task_tracker_unittest.cc:845: // Waiting is allowed by default. Expect TaskTracker to ...
4 years ago (2016-11-29 15:55:15 UTC) #25
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/2531663003/120001
4 years ago (2016-11-29 15:56:18 UTC) #28
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years ago (2016-11-29 19:46:10 UTC) #31
commit-bot: I haz the power
4 years ago (2016-11-29 19:50:21 UTC) #33
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/19509c12031a760169479b34fe6408a093b71900
Cr-Commit-Position: refs/heads/master@{#435054}

Powered by Google App Engine
This is Rietveld 408576698