| Index: webrtc/base/task_queue_win.cc
|
| diff --git a/webrtc/base/task_queue_win.cc b/webrtc/base/task_queue_win.cc
|
| index c8ef7211e895f8cffc47db8619ee1f35114349c2..73c0256b6cce5fecba5c45942c630a77e8a53921 100644
|
| --- a/webrtc/base/task_queue_win.cc
|
| +++ b/webrtc/base/task_queue_win.cc
|
| @@ -49,6 +49,19 @@ void CALLBACK InitializeQueueThread(ULONG_PTR param) {
|
| ::TlsSetValue(GetQueuePtrTls(), data->thread_context);
|
| data->started->Set();
|
| }
|
| +
|
| +ThreadPriority TaskQueuePriorityToThreadPriority(TaskQueue::Priority priority) {
|
| + switch (priority) {
|
| + case TaskQueue::HIGH:
|
| + return kRealtimePriority;
|
| + case TaskQueue::LOW:
|
| + return kLowPriority;
|
| + case TaskQueue::NORMAL:
|
| + default:
|
| + break;
|
| + }
|
| + return kNormalPriority;
|
| +}
|
| } // namespace
|
|
|
| class TaskQueue::MultimediaTimer {
|
| @@ -145,8 +158,11 @@ class TaskQueue::MultimediaTimer {
|
| RTC_DISALLOW_COPY_AND_ASSIGN(MultimediaTimer);
|
| };
|
|
|
| -TaskQueue::TaskQueue(const char* queue_name)
|
| - : thread_(&TaskQueue::ThreadMain, this, queue_name) {
|
| +TaskQueue::TaskQueue(const char* queue_name, Priority priority /*= NORMAL*/)
|
| + : thread_(&TaskQueue::ThreadMain,
|
| + this,
|
| + queue_name,
|
| + TaskQueuePriorityToThreadPriority(priority)) {
|
| RTC_DCHECK(queue_name);
|
| thread_.Start();
|
| Event event(false, false);
|
|
|