| 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 // | 142 // |
| 143 // For more examples, see task_queue_unittests.cc. | 143 // For more examples, see task_queue_unittests.cc. |
| 144 // | 144 // |
| 145 // A note on destruction: | 145 // A note on destruction: |
| 146 // | 146 // |
| 147 // When a TaskQueue is deleted, pending tasks will not be executed but they will | 147 // When a TaskQueue is deleted, pending tasks will not be executed but they will |
| 148 // be deleted. The deletion of tasks may happen asynchronously after the | 148 // be deleted. The deletion of tasks may happen asynchronously after the |
| 149 // TaskQueue itself has been deleted or it may happen synchronously while the | 149 // TaskQueue itself has been deleted or it may happen synchronously while the |
| 150 // TaskQueue instance is being deleted. This may vary from one OS to the next | 150 // TaskQueue instance is being deleted. This may vary from one OS to the next |
| 151 // so assumptions about lifetimes of pending tasks should not be made. | 151 // so assumptions about lifetimes of pending tasks should not be made. |
| 152 class LOCKABLE TaskQueue { | 152 class RTC_LOCKABLE TaskQueue { |
| 153 public: | 153 public: |
| 154 // TaskQueue priority levels. On some platforms these will map to thread | 154 // TaskQueue priority levels. On some platforms these will map to thread |
| 155 // priorities, on others such as Mac and iOS, GCD queue priorities. | 155 // priorities, on others such as Mac and iOS, GCD queue priorities. |
| 156 enum class Priority { | 156 enum class Priority { |
| 157 NORMAL = 0, | 157 NORMAL = 0, |
| 158 HIGH, | 158 HIGH, |
| 159 LOW, | 159 LOW, |
| 160 }; | 160 }; |
| 161 | 161 |
| 162 explicit TaskQueue(const char* queue_name, | 162 explicit TaskQueue(const char* queue_name, |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 class Impl; | 246 class Impl; |
| 247 const scoped_refptr<Impl> impl_; | 247 const scoped_refptr<Impl> impl_; |
| 248 #endif | 248 #endif |
| 249 | 249 |
| 250 RTC_DISALLOW_COPY_AND_ASSIGN(TaskQueue); | 250 RTC_DISALLOW_COPY_AND_ASSIGN(TaskQueue); |
| 251 }; | 251 }; |
| 252 | 252 |
| 253 } // namespace rtc | 253 } // namespace rtc |
| 254 | 254 |
| 255 #endif // WEBRTC_RTC_BASE_TASK_QUEUE_H_ | 255 #endif // WEBRTC_RTC_BASE_TASK_QUEUE_H_ |
| OLD | NEW |