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

Unified Diff: base/task_scheduler/scheduler_worker_pool_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/scheduler_worker.cc ('k') | base/task_scheduler/task_scheduler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/task_scheduler/scheduler_worker_pool_impl.h
diff --git a/base/task_scheduler/scheduler_worker_pool_impl.h b/base/task_scheduler/scheduler_worker_pool_impl.h
index 4693d635045a45c82c116008986095d9700c8680..2468b525592c1901145e2022315df46542fc2267 100644
--- a/base/task_scheduler/scheduler_worker_pool_impl.h
+++ b/base/task_scheduler/scheduler_worker_pool_impl.h
@@ -97,12 +97,10 @@ class BASE_EXPORT SchedulerWorkerPoolImpl : public SchedulerWorkerPool {
// allowed to complete their execution. This can only be called once.
void JoinForTesting();
- // Disallows worker thread detachment. If the suggested reclaim time is not
- // TimeDelta::Max(), then the test should call this before the detach code can
- // run. The safest place to do this is before the a set of work is dispatched
- // (the worker pool is idle and steady state) or before the last
- // synchronization point for all workers (all threads are busy and can't be
- // reclaimed).
+ // Disallows worker detachment. If the suggested reclaim time is not
+ // TimeDelta::Max(), the test must call this before JoinForTesting() to reduce
+ // the chance of thread detachment during the process of joining all of the
+ // threads, and as a result, threads running after JoinForTesting().
void DisallowWorkerDetachmentForTesting();
// Returns the number of workers alive in this worker pool. The value may
« no previous file with comments | « base/task_scheduler/scheduler_worker.cc ('k') | base/task_scheduler/task_scheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698