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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 std::vector<DelayedTaskInfo>, | 229 std::vector<DelayedTaskInfo>, |
230 greater<DelayedTaskInfo>> | 230 greater<DelayedTaskInfo>> |
231 timer_tasks_; | 231 timer_tasks_; |
232 UINT_PTR timer_id_ = 0; | 232 UINT_PTR timer_id_ = 0; |
233 HANDLE in_queue_; | 233 HANDLE in_queue_; |
234 }; | 234 }; |
235 | 235 |
236 TaskQueue* const queue_; | 236 TaskQueue* const queue_; |
237 WorkerThread thread_; | 237 WorkerThread thread_; |
238 rtc::CriticalSection pending_lock_; | 238 rtc::CriticalSection pending_lock_; |
239 std::queue<std::unique_ptr<QueuedTask>> pending_ GUARDED_BY(pending_lock_); | 239 std::queue<std::unique_ptr<QueuedTask>> pending_ |
| 240 RTC_GUARDED_BY(pending_lock_); |
240 HANDLE in_queue_; | 241 HANDLE in_queue_; |
241 }; | 242 }; |
242 | 243 |
243 TaskQueue::Impl::Impl(const char* queue_name, | 244 TaskQueue::Impl::Impl(const char* queue_name, |
244 TaskQueue* queue, | 245 TaskQueue* queue, |
245 Priority priority) | 246 Priority priority) |
246 : queue_(queue), | 247 : queue_(queue), |
247 thread_(&TaskQueue::Impl::ThreadMain, | 248 thread_(&TaskQueue::Impl::ThreadMain, |
248 this, | 249 this, |
249 queue_name, | 250 queue_name, |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 return TaskQueue::impl_->PostTaskAndReply(std::move(task), std::move(reply), | 498 return TaskQueue::impl_->PostTaskAndReply(std::move(task), std::move(reply), |
498 impl_.get()); | 499 impl_.get()); |
499 } | 500 } |
500 | 501 |
501 void TaskQueue::PostDelayedTask(std::unique_ptr<QueuedTask> task, | 502 void TaskQueue::PostDelayedTask(std::unique_ptr<QueuedTask> task, |
502 uint32_t milliseconds) { | 503 uint32_t milliseconds) { |
503 return TaskQueue::impl_->PostDelayedTask(std::move(task), milliseconds); | 504 return TaskQueue::impl_->PostDelayedTask(std::move(task), milliseconds); |
504 } | 505 } |
505 | 506 |
506 } // namespace rtc | 507 } // namespace rtc |
OLD | NEW |