| OLD | NEW |
| 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 #ifndef BASE_TASK_SCHEDULER_SCHEDULER_WORKER_POOL_IMPL_H_ | 5 #ifndef BASE_TASK_SCHEDULER_SCHEDULER_WORKER_POOL_IMPL_H_ |
| 6 #define BASE_TASK_SCHEDULER_SCHEDULER_WORKER_POOL_IMPL_H_ | 6 #define BASE_TASK_SCHEDULER_SCHEDULER_WORKER_POOL_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 class SchedulerWorkerDelegateImpl; | 97 class SchedulerWorkerDelegateImpl; |
| 98 | 98 |
| 99 SchedulerWorkerPoolImpl(StringPiece name, | 99 SchedulerWorkerPoolImpl(StringPiece name, |
| 100 SchedulerWorkerPoolParams::IORestriction | 100 SchedulerWorkerPoolParams::IORestriction |
| 101 io_restriction, | 101 io_restriction, |
| 102 const TimeDelta& suggested_reclaim_time, | 102 const TimeDelta& suggested_reclaim_time, |
| 103 TaskTracker* task_tracker, | 103 TaskTracker* task_tracker, |
| 104 DelayedTaskManager* delayed_task_manager); | 104 DelayedTaskManager* delayed_task_manager); |
| 105 | 105 |
| 106 bool Initialize( | 106 bool Initialize( |
| 107 ThreadPriority thread_priority, | 107 ThreadPriority priority_hint, |
| 108 size_t max_threads, | 108 size_t max_threads, |
| 109 const ReEnqueueSequenceCallback& re_enqueue_sequence_callback); | 109 const ReEnqueueSequenceCallback& re_enqueue_sequence_callback); |
| 110 | 110 |
| 111 // Wakes up the last worker from this worker pool to go idle, if any. | 111 // Wakes up the last worker from this worker pool to go idle, if any. |
| 112 void WakeUpOneWorker(); | 112 void WakeUpOneWorker(); |
| 113 | 113 |
| 114 // Adds |worker| to |idle_workers_stack_|. | 114 // Adds |worker| to |idle_workers_stack_|. |
| 115 void AddToIdleWorkersStack(SchedulerWorker* worker); | 115 void AddToIdleWorkersStack(SchedulerWorker* worker); |
| 116 | 116 |
| 117 // Peeks from |idle_workers_stack_|. | 117 // Peeks from |idle_workers_stack_|. |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 TaskTracker* const task_tracker_; | 174 TaskTracker* const task_tracker_; |
| 175 DelayedTaskManager* const delayed_task_manager_; | 175 DelayedTaskManager* const delayed_task_manager_; |
| 176 | 176 |
| 177 DISALLOW_COPY_AND_ASSIGN(SchedulerWorkerPoolImpl); | 177 DISALLOW_COPY_AND_ASSIGN(SchedulerWorkerPoolImpl); |
| 178 }; | 178 }; |
| 179 | 179 |
| 180 } // namespace internal | 180 } // namespace internal |
| 181 } // namespace base | 181 } // namespace base |
| 182 | 182 |
| 183 #endif // BASE_TASK_SCHEDULER_SCHEDULER_WORKER_POOL_IMPL_H_ | 183 #endif // BASE_TASK_SCHEDULER_SCHEDULER_WORKER_POOL_IMPL_H_ |
| OLD | NEW |