OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/task_scheduler/task_tracker.h" | 5 #include "base/task_scheduler/task_tracker.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/debug/task_annotator.h" | 8 #include "base/debug/task_annotator.h" |
9 #include "base/metrics/histogram_macros.h" | 9 #include "base/metrics/histogram_macros.h" |
10 #include "base/thread_task_runner_handle.h" | |
11 #include "base/threading/sequenced_task_runner_handle.h" | 10 #include "base/threading/sequenced_task_runner_handle.h" |
12 #include "base/threading/thread_restrictions.h" | 11 #include "base/threading/thread_restrictions.h" |
| 12 #include "base/threading/thread_task_runner_handle.h" |
13 #include "base/trace_event/trace_event.h" | 13 #include "base/trace_event/trace_event.h" |
14 | 14 |
15 namespace base { | 15 namespace base { |
16 namespace internal { | 16 namespace internal { |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 const char kQueueFunctionName[] = "base::PostTask"; | 20 const char kQueueFunctionName[] = "base::PostTask"; |
21 | 21 |
22 // This name conveys that a Task is run by the task scheduler without revealing | 22 // This name conveys that a Task is run by the task scheduler without revealing |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 AutoSchedulerLock auto_lock(lock_); | 203 AutoSchedulerLock auto_lock(lock_); |
204 DCHECK_GT(num_tasks_blocking_shutdown_, 0U); | 204 DCHECK_GT(num_tasks_blocking_shutdown_, 0U); |
205 --num_tasks_blocking_shutdown_; | 205 --num_tasks_blocking_shutdown_; |
206 if (num_tasks_blocking_shutdown_ == 0 && shutdown_cv_) | 206 if (num_tasks_blocking_shutdown_ == 0 && shutdown_cv_) |
207 shutdown_cv_->Signal(); | 207 shutdown_cv_->Signal(); |
208 } | 208 } |
209 } | 209 } |
210 | 210 |
211 } // namespace internal | 211 } // namespace internal |
212 } // namespace base | 212 } // namespace base |
OLD | NEW |