| 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_TASK_SCHEDULER_IMPL_H_ | 5 #ifndef BASE_TASK_SCHEDULER_TASK_SCHEDULER_IMPL_H_ |
| 6 #define BASE_TASK_SCHEDULER_TASK_SCHEDULER_IMPL_H_ | 6 #define BASE_TASK_SCHEDULER_TASK_SCHEDULER_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/base_export.h" | 14 #include "base/base_export.h" |
| 15 #include "base/callback.h" | 15 #include "base/callback.h" |
| 16 #include "base/logging.h" | 16 #include "base/logging.h" |
| 17 #include "base/macros.h" | 17 #include "base/macros.h" |
| 18 #include "base/memory/ref_counted.h" | 18 #include "base/memory/ref_counted.h" |
| 19 #include "base/synchronization/waitable_event.h" | 19 #include "base/synchronization/atomic_flag.h" |
| 20 #include "base/task_runner.h" | 20 #include "base/task_runner.h" |
| 21 #include "base/task_scheduler/delayed_task_manager.h" | 21 #include "base/task_scheduler/delayed_task_manager.h" |
| 22 #include "base/task_scheduler/scheduler_worker_pool_impl.h" | 22 #include "base/task_scheduler/scheduler_worker_pool_impl.h" |
| 23 #include "base/task_scheduler/sequence.h" | 23 #include "base/task_scheduler/sequence.h" |
| 24 #include "base/task_scheduler/task_scheduler.h" | 24 #include "base/task_scheduler/task_scheduler.h" |
| 25 #include "base/task_scheduler/task_tracker.h" | 25 #include "base/task_scheduler/task_tracker.h" |
| 26 #include "base/task_scheduler/task_traits.h" | 26 #include "base/task_scheduler/task_traits.h" |
| 27 #include "base/threading/thread.h" | 27 #include "base/threading/thread.h" |
| 28 | 28 |
| 29 namespace base { | 29 namespace base { |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 // DelayedTaskManager. | 86 // DelayedTaskManager. |
| 87 void OnDelayedRunTimeUpdated(); | 87 void OnDelayedRunTimeUpdated(); |
| 88 | 88 |
| 89 TaskTracker task_tracker_; | 89 TaskTracker task_tracker_; |
| 90 DelayedTaskManager delayed_task_manager_; | 90 DelayedTaskManager delayed_task_manager_; |
| 91 const WorkerPoolIndexForTraitsCallback worker_pool_index_for_traits_callback_; | 91 const WorkerPoolIndexForTraitsCallback worker_pool_index_for_traits_callback_; |
| 92 std::vector<std::unique_ptr<SchedulerWorkerPoolImpl>> worker_pools_; | 92 std::vector<std::unique_ptr<SchedulerWorkerPoolImpl>> worker_pools_; |
| 93 std::unique_ptr<SchedulerServiceThread> service_thread_; | 93 std::unique_ptr<SchedulerServiceThread> service_thread_; |
| 94 | 94 |
| 95 #if DCHECK_IS_ON() | 95 #if DCHECK_IS_ON() |
| 96 // Signaled once JoinForTesting() has returned. | 96 // Set once JoinForTesting() has returned. |
| 97 WaitableEvent join_for_testing_returned_; | 97 AtomicFlag join_for_testing_returned_; |
| 98 #endif | 98 #endif |
| 99 | 99 |
| 100 DISALLOW_COPY_AND_ASSIGN(TaskSchedulerImpl); | 100 DISALLOW_COPY_AND_ASSIGN(TaskSchedulerImpl); |
| 101 }; | 101 }; |
| 102 | 102 |
| 103 } // namespace internal | 103 } // namespace internal |
| 104 } // namespace base | 104 } // namespace base |
| 105 | 105 |
| 106 #endif // BASE_TASK_SCHEDULER_TASK_SCHEDULER_IMPL_H_ | 106 #endif // BASE_TASK_SCHEDULER_TASK_SCHEDULER_IMPL_H_ |
| OLD | NEW |