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

Unified Diff: base/task_scheduler/task_scheduler_impl.cc

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_impl.h ('k') | base/test/scoped_task_scheduler.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.cc
diff --git a/base/task_scheduler/task_scheduler_impl.cc b/base/task_scheduler/task_scheduler_impl.cc
index 827caae0f959b7cb94bc69a023e44b5220239f77..f727c8c3b176eb74a21b49ae87b6b96984d3adfb 100644
--- a/base/task_scheduler/task_scheduler_impl.cc
+++ b/base/task_scheduler/task_scheduler_impl.cc
@@ -94,6 +94,8 @@ void TaskSchedulerImpl::JoinForTesting() {
DCHECK(!join_for_testing_returned_.IsSet());
#endif
for (const auto& worker_pool : worker_pools_)
+ worker_pool->DisallowWorkerDetachmentForTesting();
+ for (const auto& worker_pool : worker_pools_)
worker_pool->JoinForTesting();
service_thread_.Stop();
#if DCHECK_IS_ON()
« no previous file with comments | « base/task_scheduler/task_scheduler_impl.h ('k') | base/test/scoped_task_scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698