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

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

Issue 2362253002: TaskScheduler: Add FlushForTesting(). (Closed)
Patch Set: fix build error Created 4 years, 2 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/task_scheduler/task_scheduler.h ('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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 ~TaskSchedulerImpl() override; 52 ~TaskSchedulerImpl() override;
53 53
54 // TaskScheduler: 54 // TaskScheduler:
55 void PostTaskWithTraits(const tracked_objects::Location& from_here, 55 void PostTaskWithTraits(const tracked_objects::Location& from_here,
56 const TaskTraits& traits, 56 const TaskTraits& traits,
57 const Closure& task) override; 57 const Closure& task) override;
58 scoped_refptr<TaskRunner> CreateTaskRunnerWithTraits( 58 scoped_refptr<TaskRunner> CreateTaskRunnerWithTraits(
59 const TaskTraits& traits, 59 const TaskTraits& traits,
60 ExecutionMode execution_mode) override; 60 ExecutionMode execution_mode) override;
61 void Shutdown() override; 61 void Shutdown() override;
62 void FlushForTesting() override;
62 63
63 // Joins all threads of this scheduler. Tasks that are already running are 64 // Joins all threads of this scheduler. Tasks that are already running are
64 // allowed to complete their execution. This can only be called once. 65 // allowed to complete their execution. This can only be called once.
65 void JoinForTesting(); 66 void JoinForTesting();
66 67
67 private: 68 private:
68 explicit TaskSchedulerImpl(const WorkerPoolIndexForTraitsCallback& 69 explicit TaskSchedulerImpl(const WorkerPoolIndexForTraitsCallback&
69 worker_pool_index_for_traits_callback); 70 worker_pool_index_for_traits_callback);
70 71
71 void Initialize( 72 void Initialize(
(...skipping 21 matching lines...) Expand all
93 AtomicFlag join_for_testing_returned_; 94 AtomicFlag join_for_testing_returned_;
94 #endif 95 #endif
95 96
96 DISALLOW_COPY_AND_ASSIGN(TaskSchedulerImpl); 97 DISALLOW_COPY_AND_ASSIGN(TaskSchedulerImpl);
97 }; 98 };
98 99
99 } // namespace internal 100 } // namespace internal
100 } // namespace base 101 } // namespace base
101 102
102 #endif // BASE_TASK_SCHEDULER_TASK_SCHEDULER_IMPL_H_ 103 #endif // BASE_TASK_SCHEDULER_TASK_SCHEDULER_IMPL_H_
OLDNEW
« no previous file with comments | « base/task_scheduler/task_scheduler.h ('k') | base/task_scheduler/task_scheduler_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698