| 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 explicit TaskQueue(const char* queue_name); | 160 explicit TaskQueue(const char* queue_name); |
| 161 // TODO(tommi): Implement move semantics? | 161 // TODO(tommi): Implement move semantics? |
| 162 ~TaskQueue(); | 162 ~TaskQueue(); |
| 163 | 163 |
| 164 static TaskQueue* Current(); | 164 static TaskQueue* Current(); |
| 165 | 165 |
| 166 // Used for DCHECKing the current queue. | 166 // Used for DCHECKing the current queue. |
| 167 static bool IsCurrent(const char* queue_name); | 167 static bool IsCurrent(const char* queue_name); |
| 168 bool IsCurrent() const; | 168 bool IsCurrent() const; |
| 169 | 169 |
| 170 // TODO(tommi): For better debuggability, implement FROM_HERE. | 170 // TODO(tommi): For better debuggability, implement RTC_FROM_HERE. |
| 171 | 171 |
| 172 // Ownership of the task is passed to PostTask. | 172 // Ownership of the task is passed to PostTask. |
| 173 void PostTask(std::unique_ptr<QueuedTask> task); | 173 void PostTask(std::unique_ptr<QueuedTask> task); |
| 174 void PostTaskAndReply(std::unique_ptr<QueuedTask> task, | 174 void PostTaskAndReply(std::unique_ptr<QueuedTask> task, |
| 175 std::unique_ptr<QueuedTask> reply, | 175 std::unique_ptr<QueuedTask> reply, |
| 176 TaskQueue* reply_queue); | 176 TaskQueue* reply_queue); |
| 177 void PostTaskAndReply(std::unique_ptr<QueuedTask> task, | 177 void PostTaskAndReply(std::unique_ptr<QueuedTask> task, |
| 178 std::unique_ptr<QueuedTask> reply); | 178 std::unique_ptr<QueuedTask> reply); |
| 179 | 179 |
| 180 void PostDelayedTask(std::unique_ptr<QueuedTask> task, uint32_t milliseconds); | 180 void PostDelayedTask(std::unique_ptr<QueuedTask> task, uint32_t milliseconds); |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 #else | 268 #else |
| 269 #error not supported. | 269 #error not supported. |
| 270 #endif | 270 #endif |
| 271 | 271 |
| 272 RTC_DISALLOW_COPY_AND_ASSIGN(TaskQueue); | 272 RTC_DISALLOW_COPY_AND_ASSIGN(TaskQueue); |
| 273 }; | 273 }; |
| 274 | 274 |
| 275 } // namespace rtc | 275 } // namespace rtc |
| 276 | 276 |
| 277 #endif // WEBRTC_BASE_TASK_QUEUE_H_ | 277 #endif // WEBRTC_BASE_TASK_QUEUE_H_ |
| OLD | NEW |