OLD | NEW |
---|---|
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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
128 // equivalent to the highest priority pending task in the sequence. | 128 // equivalent to the highest priority pending task in the sequence. |
129 SEQUENCED, | 129 SEQUENCED, |
130 | 130 |
131 // Executes one task at a time on a single thread in posting order. | 131 // Executes one task at a time on a single thread in posting order. |
132 SINGLE_THREADED, | 132 SINGLE_THREADED, |
133 }; | 133 }; |
134 | 134 |
135 // Pretty Printer for Google Test. | 135 // Pretty Printer for Google Test. |
136 void BASE_EXPORT PrintTo(const TaskPriority& task_priority, std::ostream* os); | 136 void BASE_EXPORT PrintTo(const TaskPriority& task_priority, std::ostream* os); |
137 | 137 |
138 // Stream operator so TaskPriority can be used in assertion statements. | |
139 BASE_EXPORT std::ostream& operator<<( | |
gab
2016/03/01 22:18:47
Doesn't PrintTo() also work for this type as above
fdoray
2016/03/02 00:38:41
Unfortunately no: doesn't compile if I implement P
| |
140 std::ostream& os, | |
141 const TaskShutdownBehavior& shutdown_behavior); | |
142 | |
138 } // namespace base | 143 } // namespace base |
139 | 144 |
140 #endif // BASE_TASK_SCHEDULER_TASK_TRAITS_H_ | 145 #endif // BASE_TASK_SCHEDULER_TASK_TRAITS_H_ |
OLD | NEW |