| 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 f9b04a1d2fd3076e733f9fc9efada51c063fbc09..7b285a54d38a84d6380f97bc19e4945f414cae9d 100644
|
| --- a/base/task_scheduler/scheduler_worker_pool_impl.h
|
| +++ b/base/task_scheduler/scheduler_worker_pool_impl.h
|
| @@ -147,12 +147,12 @@ class BASE_EXPORT SchedulerWorkerPoolImpl : public SchedulerWorkerPool {
|
|
|
| // All workers owned by this worker pool. Initialized by Start() within the
|
| // scope of |idle_workers_stack_lock_|. Never modified afterwards (i.e. can be
|
| - // read without synchronization once |workers_created_.IsSignaled()|).
|
| + // read without synchronization once |workers_created_.IsSet()|).
|
| std::vector<scoped_refptr<SchedulerWorker>> workers_;
|
|
|
| // Suggested reclaim time for workers. Initialized by Start(). Never modified
|
| // afterwards (i.e. can be read without synchronization once
|
| - // |workers_created_.IsSignaled()|).
|
| + // |workers_created_.IsSet()|).
|
| TimeDelta suggested_reclaim_time_;
|
|
|
| // Synchronizes access to |idle_workers_stack_|,
|
| @@ -172,7 +172,9 @@ class BASE_EXPORT SchedulerWorkerPoolImpl : public SchedulerWorkerPool {
|
| // Signaled when all workers become idle.
|
| std::unique_ptr<ConditionVariable> idle_workers_stack_cv_for_testing_;
|
|
|
| - // Number of wake ups that occurred before Start().
|
| + // Number of wake ups that occurred before Start(). Never modified after
|
| + // Start() (i.e. can be read without synchronization once
|
| + // |workers_created_.IsSet()|).
|
| int num_wake_ups_before_start_ = 0;
|
|
|
| // Signaled once JoinForTesting() has returned.
|
| @@ -183,8 +185,8 @@ class BASE_EXPORT SchedulerWorkerPoolImpl : public SchedulerWorkerPool {
|
| AtomicFlag worker_detachment_disallowed_;
|
|
|
| #if DCHECK_IS_ON()
|
| - // Signaled when all workers have been created.
|
| - mutable WaitableEvent workers_created_;
|
| + // Set when all workers have been created.
|
| + AtomicFlag workers_created_;
|
| #endif
|
|
|
| // TaskScheduler.DetachDuration.[worker pool name] histogram. Intentionally
|
|
|