OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/threading/sequenced_worker_pool.h" | 5 #include "base/threading/sequenced_worker_pool.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <list> | 9 #include <list> |
10 #include <map> | 10 #include <map> |
11 #include <memory> | 11 #include <memory> |
12 #include <set> | 12 #include <set> |
13 #include <utility> | 13 #include <utility> |
14 #include <vector> | 14 #include <vector> |
15 | 15 |
16 #include "base/atomic_sequence_num.h" | 16 #include "base/atomic_sequence_num.h" |
17 #include "base/callback.h" | 17 #include "base/callback.h" |
18 #include "base/compiler_specific.h" | 18 #include "base/compiler_specific.h" |
19 #include "base/critical_closure.h" | 19 #include "base/critical_closure.h" |
20 #include "base/lazy_instance.h" | 20 #include "base/lazy_instance.h" |
21 #include "base/logging.h" | 21 #include "base/logging.h" |
22 #include "base/macros.h" | 22 #include "base/macros.h" |
23 #include "base/memory/ptr_util.h" | 23 #include "base/memory/ptr_util.h" |
24 #include "base/stl_util.h" | 24 #include "base/stl_util.h" |
25 #include "base/strings/stringprintf.h" | 25 #include "base/strings/stringprintf.h" |
26 #include "base/synchronization/condition_variable.h" | 26 #include "base/synchronization/condition_variable.h" |
27 #include "base/synchronization/lock.h" | 27 #include "base/synchronization/lock.h" |
28 #include "base/thread_task_runner_handle.h" | |
29 #include "base/threading/platform_thread.h" | 28 #include "base/threading/platform_thread.h" |
30 #include "base/threading/simple_thread.h" | 29 #include "base/threading/simple_thread.h" |
31 #include "base/threading/thread_local.h" | 30 #include "base/threading/thread_local.h" |
32 #include "base/threading/thread_restrictions.h" | 31 #include "base/threading/thread_restrictions.h" |
| 32 #include "base/threading/thread_task_runner_handle.h" |
33 #include "base/time/time.h" | 33 #include "base/time/time.h" |
34 #include "base/trace_event/trace_event.h" | 34 #include "base/trace_event/trace_event.h" |
35 #include "base/tracked_objects.h" | 35 #include "base/tracked_objects.h" |
36 #include "build/build_config.h" | 36 #include "build/build_config.h" |
37 | 37 |
38 #if defined(OS_MACOSX) | 38 #if defined(OS_MACOSX) |
39 #include "base/mac/scoped_nsautorelease_pool.h" | 39 #include "base/mac/scoped_nsautorelease_pool.h" |
40 #elif defined(OS_WIN) | 40 #elif defined(OS_WIN) |
41 #include "base/win/scoped_com_initializer.h" | 41 #include "base/win/scoped_com_initializer.h" |
42 #endif | 42 #endif |
(...skipping 1353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1396 void SequencedWorkerPool::Shutdown(int max_new_blocking_tasks_after_shutdown) { | 1396 void SequencedWorkerPool::Shutdown(int max_new_blocking_tasks_after_shutdown) { |
1397 DCHECK(constructor_task_runner_->BelongsToCurrentThread()); | 1397 DCHECK(constructor_task_runner_->BelongsToCurrentThread()); |
1398 inner_->Shutdown(max_new_blocking_tasks_after_shutdown); | 1398 inner_->Shutdown(max_new_blocking_tasks_after_shutdown); |
1399 } | 1399 } |
1400 | 1400 |
1401 bool SequencedWorkerPool::IsShutdownInProgress() { | 1401 bool SequencedWorkerPool::IsShutdownInProgress() { |
1402 return inner_->IsShutdownInProgress(); | 1402 return inner_->IsShutdownInProgress(); |
1403 } | 1403 } |
1404 | 1404 |
1405 } // namespace base | 1405 } // namespace base |
OLD | NEW |