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

Issue 2383193002: TaskScheduler: Adjust shutdown behavior of delayed tasks. (Closed)

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

Description

TaskScheduler: Adjust shutdown behavior of delayed tasks. With this CL, the shutdown behavior of a task posted with a delay to a BLOCK_SHUTDOWN TaskRunner is automatically adjusted to SKIP_ON_SHUTDOWN. This ensures that a delayed task never blocks shutdown before being scheduled. This matches the behavior of SequencedWorkerPool. TBR=danakj@chromium.org BUG=553459 Committed: https://crrev.com/ad44b092b755176fc0f57ad0330efa2944d22a94 Cr-Commit-Position: refs/heads/master@{#422541}

Patch Set 1 #

Total comments: 11

Patch Set 2 : no copy #

Total comments: 6

Patch Set 3 : CR gab #10 #

Total comments: 5

Patch Set 4 : CR robliao #14 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+83 lines, -6 lines) Patch
M base/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M base/task_scheduler/task.h View 1 2 1 chunk +6 lines, -4 lines 0 comments Download
M base/task_scheduler/task.cc View 1 2 3 1 chunk +9 lines, -2 lines 1 comment Download
A base/task_scheduler/task_unittest.cc View 1 2 1 chunk +67 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 45 (19 generated)
fdoray
PTAL
4 years, 2 months ago (2016-09-30 18:52:56 UTC) #2
robliao
https://codereview.chromium.org/2383193002/diff/1/base/task_scheduler/task.cc File base/task_scheduler/task.cc (right): https://codereview.chromium.org/2383193002/diff/1/base/task_scheduler/task.cc#newcode28 base/task_scheduler/task.cc:28: TimeDelta delay) This should remain a const ref. AdjustShutdownBehavior ...
4 years, 2 months ago (2016-09-30 18:57:20 UTC) #3
gab
https://codereview.chromium.org/2383193002/diff/1/base/task_scheduler/task.cc File base/task_scheduler/task.cc (right): https://codereview.chromium.org/2383193002/diff/1/base/task_scheduler/task.cc#newcode33 base/task_scheduler/task.cc:33: traits(AdjustShutdownBehavior(traits, delay)) {} So this potentially results in 3 ...
4 years, 2 months ago (2016-09-30 19:01:26 UTC) #4
fdoray
https://codereview.chromium.org/2383193002/diff/1/base/task_scheduler/task.cc File base/task_scheduler/task.cc (right): https://codereview.chromium.org/2383193002/diff/1/base/task_scheduler/task.cc#newcode28 base/task_scheduler/task.cc:28: TimeDelta delay) On 2016/09/30 18:57:20, robliao wrote: > This ...
4 years, 2 months ago (2016-09-30 19:10:11 UTC) #5
robliao
https://codereview.chromium.org/2383193002/diff/1/base/task_scheduler/task.h File base/task_scheduler/task.h (right): https://codereview.chromium.org/2383193002/diff/1/base/task_scheduler/task.h#newcode33 base/task_scheduler/task.h:33: TimeDelta delay); On 2016/09/30 19:10:11, fdoray wrote: > On ...
4 years, 2 months ago (2016-09-30 19:16:56 UTC) #6
gab
FTR https://codereview.chromium.org/2383193002/diff/1/base/task_scheduler/task.h File base/task_scheduler/task.h (right): https://codereview.chromium.org/2383193002/diff/1/base/task_scheduler/task.h#newcode33 base/task_scheduler/task.h:33: TimeDelta delay); On 2016/09/30 19:16:56, robliao wrote: > ...
4 years, 2 months ago (2016-09-30 19:34:46 UTC) #8
fdoray
PTAnL https://codereview.chromium.org/2383193002/diff/1/base/task_scheduler/task_unittest.cc File base/task_scheduler/task_unittest.cc (right): https://codereview.chromium.org/2383193002/diff/1/base/task_scheduler/task_unittest.cc#newcode16 base/task_scheduler/task_unittest.cc:16: // Verify that iff a task is created ...
4 years, 2 months ago (2016-10-03 15:43:30 UTC) #9
gab
lgtm % comments https://codereview.chromium.org/2383193002/diff/20001/base/task_scheduler/task.cc File base/task_scheduler/task.cc (right): https://codereview.chromium.org/2383193002/diff/20001/base/task_scheduler/task.cc#newcode23 base/task_scheduler/task.cc:23: this->traits.WithShutdownBehavior(TaskShutdownBehavior::SKIP_ON_SHUTDOWN); rm "this->" ? To avoid ...
4 years, 2 months ago (2016-10-03 16:59:53 UTC) #10
fdoray
robliao@: PTAL https://codereview.chromium.org/2383193002/diff/20001/base/task_scheduler/task.cc File base/task_scheduler/task.cc (right): https://codereview.chromium.org/2383193002/diff/20001/base/task_scheduler/task.cc#newcode23 base/task_scheduler/task.cc:23: this->traits.WithShutdownBehavior(TaskShutdownBehavior::SKIP_ON_SHUTDOWN); On 2016/10/03 16:59:53, gab wrote: > ...
4 years, 2 months ago (2016-10-03 17:10:15 UTC) #11
robliao
lgtm + comments https://codereview.chromium.org/2383193002/diff/40001/base/task_scheduler/task.cc File base/task_scheduler/task.cc (right): https://codereview.chromium.org/2383193002/diff/40001/base/task_scheduler/task.cc#newcode23 base/task_scheduler/task.cc:23: traits_in.WithShutdownBehavior(TaskShutdownBehavior::SKIP_ON_SHUTDOWN); Should this be traits instead ...
4 years, 2 months ago (2016-10-03 17:16:35 UTC) #14
fdoray
https://codereview.chromium.org/2383193002/diff/40001/base/task_scheduler/task.cc File base/task_scheduler/task.cc (right): https://codereview.chromium.org/2383193002/diff/40001/base/task_scheduler/task.cc#newcode23 base/task_scheduler/task.cc:23: traits_in.WithShutdownBehavior(TaskShutdownBehavior::SKIP_ON_SHUTDOWN); On 2016/10/03 17:16:35, robliao wrote: > Should this ...
4 years, 2 months ago (2016-10-03 17:27:48 UTC) #17
robliao
https://codereview.chromium.org/2383193002/diff/40001/base/task_scheduler/task.cc File base/task_scheduler/task.cc (right): https://codereview.chromium.org/2383193002/diff/40001/base/task_scheduler/task.cc#newcode23 base/task_scheduler/task.cc:23: traits_in.WithShutdownBehavior(TaskShutdownBehavior::SKIP_ON_SHUTDOWN); On 2016/10/03 17:27:48, fdoray wrote: > On 2016/10/03 ...
4 years, 2 months ago (2016-10-03 17:30:12 UTC) #20
fdoray
https://codereview.chromium.org/2383193002/diff/40001/base/task_scheduler/task.cc File base/task_scheduler/task.cc (right): https://codereview.chromium.org/2383193002/diff/40001/base/task_scheduler/task.cc#newcode23 base/task_scheduler/task.cc:23: traits_in.WithShutdownBehavior(TaskShutdownBehavior::SKIP_ON_SHUTDOWN); On 2016/10/03 17:30:12, robliao wrote: > On 2016/10/03 ...
4 years, 2 months ago (2016-10-03 17:36:33 UTC) #21
robliao
On 2016/10/03 17:36:33, fdoray wrote: > https://codereview.chromium.org/2383193002/diff/40001/base/task_scheduler/task.cc > File base/task_scheduler/task.cc (right): > > https://codereview.chromium.org/2383193002/diff/40001/base/task_scheduler/task.cc#newcode23 > ...
4 years, 2 months ago (2016-10-03 17:39:20 UTC) #22
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/2383193002/60001
4 years, 2 months ago (2016-10-03 17:50:01 UTC) #26
robliao
https://codereview.chromium.org/2383193002/diff/40001/base/task_scheduler/task.cc File base/task_scheduler/task.cc (right): https://codereview.chromium.org/2383193002/diff/40001/base/task_scheduler/task.cc#newcode23 base/task_scheduler/task.cc:23: traits_in.WithShutdownBehavior(TaskShutdownBehavior::SKIP_ON_SHUTDOWN); On 2016/10/03 17:36:33, fdoray wrote: > On 2016/10/03 ...
4 years, 2 months ago (2016-10-03 17:50:25 UTC) #27
fdoray
On 2016/10/03 17:39:20, robliao wrote: > On 2016/10/03 17:36:33, fdoray wrote: > > > https://codereview.chromium.org/2383193002/diff/40001/base/task_scheduler/task.cc ...
4 years, 2 months ago (2016-10-03 17:50:30 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/272061)
4 years, 2 months ago (2016-10-03 17:56:02 UTC) #30
fdoray
TBR danakj for changes in base/BUILD.gn
4 years, 2 months ago (2016-10-03 17:57:37 UTC) #32
fdoray
TBR danakj for changes in base/BUILD.gn
4 years, 2 months ago (2016-10-03 17:57:51 UTC) #34
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/2383193002/60001
4 years, 2 months ago (2016-10-03 17:58:56 UTC) #36
commit-bot: I haz the power
Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_swarming_rel/builds/41203)
4 years, 2 months ago (2016-10-03 18:42:59 UTC) #38
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/2383193002/60001
4 years, 2 months ago (2016-10-03 19:46:33 UTC) #40
danakj
LGTM https://codereview.chromium.org/2383193002/diff/60001/base/task_scheduler/task.cc File base/task_scheduler/task.cc (right): https://codereview.chromium.org/2383193002/diff/60001/base/task_scheduler/task.cc#newcode21 base/task_scheduler/task.cc:21: if (!delay.is_zero() && Maybe you could put this ...
4 years, 2 months ago (2016-10-03 20:08:45 UTC) #41
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 2 months ago (2016-10-03 21:36:00 UTC) #43
commit-bot: I haz the power
4 years, 2 months ago (2016-10-03 21:39:27 UTC) #45
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/ad44b092b755176fc0f57ad0330efa2944d22a94
Cr-Commit-Position: refs/heads/master@{#422541}

Powered by Google App Engine
This is Rietveld 408576698