| Index: base/task_scheduler/task_tracker.h
|
| diff --git a/base/task_scheduler/task_tracker.h b/base/task_scheduler/task_tracker.h
|
| index 14ca1f419329dc9cb890eab9e9693f5419d8d250..e83eb568a0436b05db0127e0d7290dce9f9e902a 100644
|
| --- a/base/task_scheduler/task_tracker.h
|
| +++ b/base/task_scheduler/task_tracker.h
|
| @@ -117,9 +117,9 @@ class BASE_EXPORT TaskTracker {
|
| const std::unique_ptr<State> state_;
|
|
|
| // Number of undelayed tasks that haven't completed their execution. Is
|
| - // incremented and decremented without a barrier. When it reaches zero,
|
| - // |flush_lock_| is acquired (forcing memory synchronization) and |flush_cv_|
|
| - // is signaled.
|
| + // decremented with a memory barrier after a task runs. Is accessed with an
|
| + // acquire memory barrier in Flush(). The memory barriers ensure that the
|
| + // memory written by flushed tasks is visible when Flush() returns.
|
| subtle::Atomic32 num_pending_undelayed_tasks_ = 0;
|
|
|
| // Lock associated with |flush_cv_|. Partially synchronizes access to
|
|
|