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

Side by Side Diff: base/task_scheduler/task_traits.h

Issue 1708773002: TaskScheduler [7] SchedulerThreadPool (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@s_5_worker_thread
Patch Set: fix windows build error Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_TASK_SCHEDULER_TASK_TRAITS_H_ 5 #ifndef BASE_TASK_SCHEDULER_TASK_TRAITS_H_
6 #define BASE_TASK_SCHEDULER_TASK_TRAITS_H_ 6 #define BASE_TASK_SCHEDULER_TASK_TRAITS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <iosfwd> 10 #include <iosfwd>
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 // Returns true if file I/O is allowed by these traits. 101 // Returns true if file I/O is allowed by these traits.
102 bool with_file_io() const { return with_file_io_; } 102 bool with_file_io() const { return with_file_io_; }
103 103
104 // Returns the priority of tasks with these traits. 104 // Returns the priority of tasks with these traits.
105 TaskPriority priority() const { return priority_; } 105 TaskPriority priority() const { return priority_; }
106 106
107 // Returns the shutdown behavior of tasks with these traits. 107 // Returns the shutdown behavior of tasks with these traits.
108 TaskShutdownBehavior shutdown_behavior() const { return shutdown_behavior_; } 108 TaskShutdownBehavior shutdown_behavior() const { return shutdown_behavior_; }
109 109
110 bool operator==(const TaskTraits& other) const;
111
110 private: 112 private:
111 bool with_file_io_; 113 bool with_file_io_;
112 TaskPriority priority_; 114 TaskPriority priority_;
113 TaskShutdownBehavior shutdown_behavior_; 115 TaskShutdownBehavior shutdown_behavior_;
114 }; 116 };
115 117
116 // Describes how tasks are executed by a task runner. 118 // Describes how tasks are executed by a task runner.
117 enum class ExecutionMode { 119 enum class ExecutionMode {
118 // Can execute multiple tasks at a time in any order. 120 // Can execute multiple tasks at a time in any order.
119 PARALLEL, 121 PARALLEL,
(...skipping 11 matching lines...) Expand all
131 BASE_EXPORT std::ostream& operator<<(std::ostream& os, 133 BASE_EXPORT std::ostream& operator<<(std::ostream& os,
132 const TaskPriority& shutdown_behavior); 134 const TaskPriority& shutdown_behavior);
133 135
134 BASE_EXPORT std::ostream& operator<<( 136 BASE_EXPORT std::ostream& operator<<(
135 std::ostream& os, 137 std::ostream& os,
136 const TaskShutdownBehavior& shutdown_behavior); 138 const TaskShutdownBehavior& shutdown_behavior);
137 139
138 } // namespace base 140 } // namespace base
139 141
140 #endif // BASE_TASK_SCHEDULER_TASK_TRAITS_H_ 142 #endif // BASE_TASK_SCHEDULER_TASK_TRAITS_H_
OLDNEW
« no previous file with comments | « base/task_scheduler/scheduler_thread_pool_unittest.cc ('k') | base/task_scheduler/task_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698