OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 // | 146 // |
147 // For more examples, see task_queue_unittests.cc. | 147 // For more examples, see task_queue_unittests.cc. |
148 // | 148 // |
149 // A note on destruction: | 149 // A note on destruction: |
150 // | 150 // |
151 // When a TaskQueue is deleted, pending tasks will not be executed but they will | 151 // When a TaskQueue is deleted, pending tasks will not be executed but they will |
152 // be deleted. The deletion of tasks may happen asynchronously after the | 152 // be deleted. The deletion of tasks may happen asynchronously after the |
153 // TaskQueue itself has been deleted or it may happen synchronously while the | 153 // TaskQueue itself has been deleted or it may happen synchronously while the |
154 // TaskQueue instance is being deleted. This may vary from one OS to the next | 154 // TaskQueue instance is being deleted. This may vary from one OS to the next |
155 // so assumptions about lifetimes of pending tasks should not be made. | 155 // so assumptions about lifetimes of pending tasks should not be made. |
156 class LOCKABLE TaskQueue { | 156 class RTC_LOCKABLE TaskQueue { |
157 public: | 157 public: |
158 // TaskQueue priority levels. On some platforms these will map to thread | 158 // TaskQueue priority levels. On some platforms these will map to thread |
159 // priorities, on others such as Mac and iOS, GCD queue priorities. | 159 // priorities, on others such as Mac and iOS, GCD queue priorities. |
160 enum class Priority { | 160 enum class Priority { |
161 NORMAL = 0, | 161 NORMAL = 0, |
162 HIGH, | 162 HIGH, |
163 LOW, | 163 LOW, |
164 }; | 164 }; |
165 | 165 |
166 explicit TaskQueue(const char* queue_name, | 166 explicit TaskQueue(const char* queue_name, |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 class Impl; | 271 class Impl; |
272 const scoped_refptr<Impl> impl_; | 272 const scoped_refptr<Impl> impl_; |
273 #endif | 273 #endif |
274 | 274 |
275 RTC_DISALLOW_COPY_AND_ASSIGN(TaskQueue); | 275 RTC_DISALLOW_COPY_AND_ASSIGN(TaskQueue); |
276 }; | 276 }; |
277 | 277 |
278 } // namespace rtc | 278 } // namespace rtc |
279 | 279 |
280 #endif // WEBRTC_RTC_BASE_TASK_QUEUE_H_ | 280 #endif // WEBRTC_RTC_BASE_TASK_QUEUE_H_ |
OLD | NEW |