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_THREAD_POOL_IMPL_H_ | 5 #ifndef BASE_TASK_SCHEDULER_SCHEDULER_THREAD_POOL_IMPL_H_ |
6 #define BASE_TASK_SCHEDULER_SCHEDULER_THREAD_POOL_IMPL_H_ | 6 #define BASE_TASK_SCHEDULER_SCHEDULER_THREAD_POOL_IMPL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 13 matching lines...) Expand all Loading... |
24 #include "base/task_scheduler/scheduler_worker_thread_stack.h" | 24 #include "base/task_scheduler/scheduler_worker_thread_stack.h" |
25 #include "base/task_scheduler/sequence.h" | 25 #include "base/task_scheduler/sequence.h" |
26 #include "base/task_scheduler/task.h" | 26 #include "base/task_scheduler/task.h" |
27 #include "base/task_scheduler/task_traits.h" | 27 #include "base/task_scheduler/task_traits.h" |
28 #include "base/threading/platform_thread.h" | 28 #include "base/threading/platform_thread.h" |
29 | 29 |
30 namespace base { | 30 namespace base { |
31 namespace internal { | 31 namespace internal { |
32 | 32 |
33 class DelayedTaskManager; | 33 class DelayedTaskManager; |
34 struct SequenceSortKey; | |
35 class TaskTracker; | 34 class TaskTracker; |
36 | 35 |
37 // A pool of threads that run Tasks. This class is thread-safe. | 36 // A pool of threads that run Tasks. This class is thread-safe. |
38 class BASE_EXPORT SchedulerThreadPoolImpl : public SchedulerThreadPool { | 37 class BASE_EXPORT SchedulerThreadPoolImpl : public SchedulerThreadPool { |
39 public: | 38 public: |
40 // Callback invoked when a Sequence isn't empty after a worker thread pops a | 39 // Callback invoked when a Sequence isn't empty after a worker thread pops a |
41 // Task from it. | 40 // Task from it. |
42 using ReEnqueueSequenceCallback = Callback<void(scoped_refptr<Sequence>)>; | 41 using ReEnqueueSequenceCallback = Callback<void(scoped_refptr<Sequence>)>; |
43 | 42 |
44 // Destroying a SchedulerThreadPool returned by CreateThreadPool() is not | 43 // Destroying a SchedulerThreadPool returned by CreateThreadPool() is not |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 TaskTracker* const task_tracker_; | 136 TaskTracker* const task_tracker_; |
138 DelayedTaskManager* const delayed_task_manager_; | 137 DelayedTaskManager* const delayed_task_manager_; |
139 | 138 |
140 DISALLOW_COPY_AND_ASSIGN(SchedulerThreadPoolImpl); | 139 DISALLOW_COPY_AND_ASSIGN(SchedulerThreadPoolImpl); |
141 }; | 140 }; |
142 | 141 |
143 } // namespace internal | 142 } // namespace internal |
144 } // namespace base | 143 } // namespace base |
145 | 144 |
146 #endif // BASE_TASK_SCHEDULER_SCHEDULER_THREAD_POOL_IMPL_H_ | 145 #endif // BASE_TASK_SCHEDULER_SCHEDULER_THREAD_POOL_IMPL_H_ |
OLD | NEW |