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

Unified Diff: base/task_scheduler/task.h

Issue 2383193002: TaskScheduler: Adjust shutdown behavior of delayed tasks. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/task_scheduler/task.h
diff --git a/base/task_scheduler/task.h b/base/task_scheduler/task.h
index 2b53c690fddffc752ce63ec98b900a0b34f06674..7d9f9f4e5ba6cc79bff166c24f2230a4d511f14d 100644
--- a/base/task_scheduler/task.h
+++ b/base/task_scheduler/task.h
@@ -24,11 +24,13 @@ namespace internal {
struct BASE_EXPORT Task : public PendingTask {
// |posted_from| is the site the task was posted from. |task| is the closure
// to run. |traits| is metadata about the task. |delay| is a delay that must
- // expire before the Task runs.
+ // expire before the Task runs. If |delay| is non-zero and the shutdown
+ // behavior in |traits| is BLOCK_SHUTDOWN, the shutdown behavior is
+ // automatically changed to SKIP_ON_SHUTDOWN.
Task(const tracked_objects::Location& posted_from,
const Closure& task,
const TaskTraits& traits,
- const TimeDelta& delay);
+ TimeDelta delay);
gab 2016/09/30 19:01:26 Is passing TimeDelta by value common practice? I k
fdoray 2016/09/30 19:10:11 See https://cs.chromium.org/chromium/src/base/time
robliao 2016/09/30 19:16:56 I don't think there is a style ruling on passing b
gab 2016/09/30 19:34:45 IMO by value only wins because of https://cs.chrom
~Task();
// The TaskTraits of this task.
« no previous file with comments | « base/BUILD.gn ('k') | base/task_scheduler/task.cc » ('j') | base/task_scheduler/task.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698