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 <list> | 7 #include <list> |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <utility> | 10 #include <utility> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/atomicops.h" | 13 #include "base/atomicops.h" |
14 #include "base/callback.h" | 14 #include "base/callback.h" |
15 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
16 #include "base/critical_closure.h" | 16 #include "base/critical_closure.h" |
17 #include "base/debug/trace_event.h" | 17 #include "base/debug/trace_event.h" |
18 #include "base/logging.h" | 18 #include "base/logging.h" |
19 #include "base/memory/linked_ptr.h" | 19 #include "base/memory/linked_ptr.h" |
20 #include "base/message_loop/message_loop_proxy.h" | 20 #include "base/message_loop/message_loop_proxy.h" |
21 #include "base/metrics/histogram.h" | 21 #include "base/metrics/histogram.h" |
22 #include "base/stl_util.h" | 22 #include "base/stl_util.h" |
23 #include "base/strings/stringprintf.h" | 23 #include "base/strings/stringprintf.h" |
24 #include "base/synchronization/condition_variable.h" | 24 #include "base/synchronization/condition_variable.h" |
25 #include "base/synchronization/lock.h" | 25 #include "base/synchronization/lock.h" |
26 #include "base/threading/platform_thread.h" | 26 #include "base/threading/platform_thread.h" |
27 #include "base/threading/simple_thread.h" | 27 #include "base/threading/simple_thread.h" |
28 #include "base/threading/thread_restrictions.h" | 28 #include "base/threading/thread_restrictions.h" |
29 #include "base/time.h" | 29 #include "base/time/time.h" |
30 #include "base/tracked_objects.h" | 30 #include "base/tracked_objects.h" |
31 | 31 |
32 #if defined(OS_MACOSX) | 32 #if defined(OS_MACOSX) |
33 #include "base/mac/scoped_nsautorelease_pool.h" | 33 #include "base/mac/scoped_nsautorelease_pool.h" |
34 #endif | 34 #endif |
35 | 35 |
36 namespace base { | 36 namespace base { |
37 | 37 |
38 namespace { | 38 namespace { |
39 | 39 |
(...skipping 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1230 void SequencedWorkerPool::SignalHasWorkForTesting() { | 1230 void SequencedWorkerPool::SignalHasWorkForTesting() { |
1231 inner_->SignalHasWorkForTesting(); | 1231 inner_->SignalHasWorkForTesting(); |
1232 } | 1232 } |
1233 | 1233 |
1234 void SequencedWorkerPool::Shutdown(int max_new_blocking_tasks_after_shutdown) { | 1234 void SequencedWorkerPool::Shutdown(int max_new_blocking_tasks_after_shutdown) { |
1235 DCHECK(constructor_message_loop_->BelongsToCurrentThread()); | 1235 DCHECK(constructor_message_loop_->BelongsToCurrentThread()); |
1236 inner_->Shutdown(max_new_blocking_tasks_after_shutdown); | 1236 inner_->Shutdown(max_new_blocking_tasks_after_shutdown); |
1237 } | 1237 } |
1238 | 1238 |
1239 } // namespace base | 1239 } // namespace base |
OLD | NEW |