Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(531)

Side by Side Diff: base/task_scheduler/scheduler_worker_pool_impl.cc

Issue 2540593006: Fix TODO Typo (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/task_scheduler/scheduler_worker_pool_impl.h" 5 #include "base/task_scheduler/scheduler_worker_pool_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <utility> 10 #include <utility>
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 workers_created_.Signal(); 760 workers_created_.Signal();
761 #endif 761 #endif
762 762
763 return !workers_.empty(); 763 return !workers_.empty();
764 } 764 }
765 765
766 void SchedulerWorkerPoolImpl::WakeUpWorker(SchedulerWorker* worker) { 766 void SchedulerWorkerPoolImpl::WakeUpWorker(SchedulerWorker* worker) {
767 DCHECK(worker); 767 DCHECK(worker);
768 RemoveFromIdleWorkersStack(worker); 768 RemoveFromIdleWorkersStack(worker);
769 worker->WakeUp(); 769 worker->WakeUp();
770 // TOOD(robliao): Honor StandbyThreadPolicy::ONE here and consider adding 770 // TODO(robliao): Honor StandbyThreadPolicy::ONE here and consider adding
771 // hysteresis to the CanDetach check. See https://crbug.com/666041. 771 // hysteresis to the CanDetach check. See https://crbug.com/666041.
772 } 772 }
773 773
774 void SchedulerWorkerPoolImpl::WakeUpOneWorker() { 774 void SchedulerWorkerPoolImpl::WakeUpOneWorker() {
775 SchedulerWorker* worker; 775 SchedulerWorker* worker;
776 { 776 {
777 AutoSchedulerLock auto_lock(idle_workers_stack_lock_); 777 AutoSchedulerLock auto_lock(idle_workers_stack_lock_);
778 worker = idle_workers_stack_.Pop(); 778 worker = idle_workers_stack_.Pop();
779 } 779 }
780 if (worker) 780 if (worker)
(...skipping 26 matching lines...) Expand all
807 AutoSchedulerLock auto_lock(idle_workers_stack_lock_); 807 AutoSchedulerLock auto_lock(idle_workers_stack_lock_);
808 idle_workers_stack_.Remove(worker); 808 idle_workers_stack_.Remove(worker);
809 } 809 }
810 810
811 bool SchedulerWorkerPoolImpl::CanWorkerDetachForTesting() { 811 bool SchedulerWorkerPoolImpl::CanWorkerDetachForTesting() {
812 return !worker_detachment_disallowed_.IsSet(); 812 return !worker_detachment_disallowed_.IsSet();
813 } 813 }
814 814
815 } // namespace internal 815 } // namespace internal
816 } // namespace base 816 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698