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

Side by Side Diff: base/task_scheduler/task_scheduler_impl.h

Issue 2692273008: Hacky slashy (Closed)
Patch Set: rebase on config CL, and minor fixes Created 3 years, 7 months 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 | « base/sys_info_fuchsia.cc ('k') | base/task_scheduler/task_scheduler_impl.cc » ('j') | 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 #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 <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 void FlushForTesting() override; 64 void FlushForTesting() override;
65 void JoinForTesting() override; 65 void JoinForTesting() override;
66 66
67 private: 67 private:
68 // Returns the worker pool that runs Tasks with |traits|. 68 // Returns the worker pool that runs Tasks with |traits|.
69 SchedulerWorkerPoolImpl* GetWorkerPoolForTraits( 69 SchedulerWorkerPoolImpl* GetWorkerPoolForTraits(
70 const TaskTraits& traits) const; 70 const TaskTraits& traits) const;
71 71
72 const std::string name_; 72 const std::string name_;
73 Thread service_thread_; 73 Thread service_thread_;
74 #if defined(OS_POSIX) && !defined(OS_NACL_SFI) 74 #if defined(OS_POSIX) && !defined(OS_NACL_SFI) && !defined(OS_FUCHSIA)
75 TaskTrackerPosix task_tracker_; 75 TaskTrackerPosix task_tracker_;
76 #else 76 #else
77 TaskTracker task_tracker_; 77 TaskTracker task_tracker_;
78 #endif 78 #endif
79 DelayedTaskManager delayed_task_manager_; 79 DelayedTaskManager delayed_task_manager_;
80 SchedulerSingleThreadTaskRunnerManager single_thread_task_runner_manager_; 80 SchedulerSingleThreadTaskRunnerManager single_thread_task_runner_manager_;
81 81
82 // There are 4 SchedulerWorkerPoolImpl in this array to match the 4 82 // There are 4 SchedulerWorkerPoolImpl in this array to match the 4
83 // SchedulerWorkerPoolParams in TaskScheduler::InitParams. 83 // SchedulerWorkerPoolParams in TaskScheduler::InitParams.
84 std::unique_ptr<SchedulerWorkerPoolImpl> worker_pools_[4]; 84 std::unique_ptr<SchedulerWorkerPoolImpl> worker_pools_[4];
85 85
86 #if DCHECK_IS_ON() 86 #if DCHECK_IS_ON()
87 // Set once JoinForTesting() has returned. 87 // Set once JoinForTesting() has returned.
88 AtomicFlag join_for_testing_returned_; 88 AtomicFlag join_for_testing_returned_;
89 #endif 89 #endif
90 90
91 DISALLOW_COPY_AND_ASSIGN(TaskSchedulerImpl); 91 DISALLOW_COPY_AND_ASSIGN(TaskSchedulerImpl);
92 }; 92 };
93 93
94 } // namespace internal 94 } // namespace internal
95 } // namespace base 95 } // namespace base
96 96
97 #endif // BASE_TASK_SCHEDULER_TASK_SCHEDULER_IMPL_H_ 97 #endif // BASE_TASK_SCHEDULER_TASK_SCHEDULER_IMPL_H_
OLDNEW
« no previous file with comments | « base/sys_info_fuchsia.cc ('k') | base/task_scheduler/task_scheduler_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698