Index: base/threading/simple_thread.cc |
diff --git a/base/threading/simple_thread.cc b/base/threading/simple_thread.cc |
index 1bc31135941f0169603924dfa0d8d3542e6ab650..7059ceab76661428a3a4e9f7eb124e524b162ebe 100644 |
--- a/base/threading/simple_thread.cc |
+++ b/base/threading/simple_thread.cc |
@@ -29,7 +29,13 @@ SimpleThread::~SimpleThread() { |
void SimpleThread::Start() { |
DCHECK(!HasBeenStarted()) << "Tried to Start a thread multiple times."; |
- bool success = PlatformThread::Create(options_.stack_size(), this, &thread_); |
+ bool success; |
+ if (options_.priority() == ThreadPriority::NORMAL) { |
+ success = PlatformThread::Create(options_.stack_size(), this, &thread_); |
+ } else { |
+ success = PlatformThread::CreateWithPriority(options_.stack_size(), this, |
+ &thread_, options_.priority()); |
+ } |
DCHECK(success); |
base::ThreadRestrictions::ScopedAllowWait allow_wait; |
event_.Wait(); // Wait for the thread to complete initialization. |