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

Unified Diff: base/task_scheduler/task_scheduler_impl.h

Issue 2628313004: Add TaskScheduler::JoinForTesting(). (Closed)
Patch Set: self-review Created 3 years, 11 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/task_scheduler/task_scheduler_impl.h
diff --git a/base/task_scheduler/task_scheduler_impl.h b/base/task_scheduler/task_scheduler_impl.h
index 3e6cfdb12d43c0a3bd85c1519d9c66204bc47b3e..7a083c647fbd47968afb2a7bfb7eb4cd0b4266b9 100644
--- a/base/task_scheduler/task_scheduler_impl.h
+++ b/base/task_scheduler/task_scheduler_impl.h
@@ -44,9 +44,6 @@ class BASE_EXPORT TaskSchedulerImpl : public TaskScheduler {
const WorkerPoolIndexForTraitsCallback&
worker_pool_index_for_traits_callback);
- // Destroying a TaskSchedulerImpl is not allowed in production; it is always
- // leaked. In tests, it can only be destroyed after JoinForTesting() has
- // returned.
~TaskSchedulerImpl() override;
// TaskScheduler:
@@ -63,10 +60,7 @@ class BASE_EXPORT TaskSchedulerImpl : public TaskScheduler {
std::vector<const HistogramBase*> GetHistograms() const override;
void Shutdown() override;
void FlushForTesting() override;
-
- // Joins all threads. Tasks that are already running are allowed to complete
- // their execution. This can only be called once.
- void JoinForTesting();
+ void JoinForTesting() override;
private:
explicit TaskSchedulerImpl(const WorkerPoolIndexForTraitsCallback&
« 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