Index: base/task_scheduler/scheduler_thread_pool.cc |
diff --git a/base/task_scheduler/scheduler_thread_pool.cc b/base/task_scheduler/scheduler_thread_pool.cc |
index 1ac547f5cb6cf13243fde345bef1d8cb6fa693bc..8a8d3819b308181c17abd744e4ab92ea9c3debcf 100644 |
--- a/base/task_scheduler/scheduler_thread_pool.cc |
+++ b/base/task_scheduler/scheduler_thread_pool.cc |
@@ -125,8 +125,9 @@ class SchedulerThreadPool::SchedulerWorkerThreadDelegateImpl |
// SchedulerWorkerThread::Delegate: |
void OnMainEntry() override; |
- scoped_refptr<Sequence> GetWork( |
- SchedulerWorkerThread* worker_thread) override; |
+ scoped_refptr<Sequence> GetWork(SchedulerWorkerThread* worker_thread, |
+ PriorityQueue* single_threaded_priority_queue, |
robliao
2016/04/18 19:53:51
single_thread_priority_queue -> alternate_priority
fdoray
2016/04/18 20:40:55
Done.
|
+ bool* is_single_threaded_sequence) override; |
void EnqueueSequence(scoped_refptr<Sequence> sequence) override; |
private: |
@@ -241,7 +242,12 @@ void SchedulerThreadPool::SchedulerWorkerThreadDelegateImpl::OnMainEntry() { |
scoped_refptr<Sequence> |
SchedulerThreadPool::SchedulerWorkerThreadDelegateImpl::GetWork( |
- SchedulerWorkerThread* worker_thread) { |
+ SchedulerWorkerThread* worker_thread, |
+ PriorityQueue* single_threaded_priority_queue, |
+ bool* is_single_threaded_sequence) { |
+ // TODO(fdoray): Return a Sequence from |single_threaded_priority_queue| when |
+ // appropriate. |
+ |
std::unique_ptr<PriorityQueue::Transaction> transaction( |
outer_->shared_priority_queue_.BeginTransaction()); |
const auto sequence_and_sort_key = transaction->Peek(); |
@@ -298,7 +304,8 @@ bool SchedulerThreadPool::Initialize(ThreadPriority thread_priority, |
for (size_t i = 0; i < max_threads; ++i) { |
std::unique_ptr<SchedulerWorkerThread> worker_thread = |
SchedulerWorkerThread::CreateSchedulerWorkerThread( |
- thread_priority, worker_thread_delegate_.get(), task_tracker_); |
+ thread_priority, worker_thread_delegate_.get(), task_tracker_, |
+ delayed_task_manager_, &shared_priority_queue_); |
if (!worker_thread) |
break; |
idle_worker_threads_stack_.push(worker_thread.get()); |