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 #ifndef BASE_THREADING_SEQUENCED_WORKER_POOL_INNER_H_ | 5 #ifndef BASE_THREADING_SEQUENCED_WORKER_POOL_INNER_H_ |
6 #define BASE_THREADING_SEQUENCED_WORKER_POOL_INNER_H_ | 6 #define BASE_THREADING_SEQUENCED_WORKER_POOL_INNER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <cstddef> | 9 #include <cstddef> |
10 #include <list> | 10 #include <list> |
11 #include <map> | 11 #include <map> |
12 #include <set> | 12 #include <set> |
13 #include <string> | 13 #include <string> |
14 #include <vector> | 14 #include <vector> |
15 | 15 |
16 #include "base/atomicops.h" | 16 #include "base/atomicops.h" |
| 17 #include "base/base_export.h" |
17 #include "base/callback.h" | 18 #include "base/callback.h" |
18 #include "base/memory/linked_ptr.h" | 19 #include "base/memory/linked_ptr.h" |
19 #include "base/memory/ref_counted.h" | 20 #include "base/memory/ref_counted.h" |
20 #include "base/synchronization/condition_variable.h" | 21 #include "base/synchronization/condition_variable.h" |
21 #include "base/synchronization/lock.h" | 22 #include "base/synchronization/lock.h" |
22 #include "base/threading/sequenced_worker_pool.h" | 23 #include "base/threading/sequenced_worker_pool.h" |
23 #include "base/tracked_objects.h" | 24 #include "base/tracked_objects.h" |
24 | 25 |
25 namespace base { | 26 namespace base { |
26 namespace internal { | 27 namespace internal { |
27 | 28 |
28 class SequencedWorkerPoolWorker; | 29 class SequencedWorkerPoolWorker; |
29 | 30 |
30 // This class is part of the SequencedWorkerPool implementation. | 31 // This class is part of the SequencedWorkerPool implementation. |
31 // DO NOT USE THIS CLASS DIRECTLY YOURSELF. | 32 // DO NOT USE THIS CLASS DIRECTLY YOURSELF. |
32 class SequencedWorkerPoolInner | 33 class BASE_EXPORT SequencedWorkerPoolInner |
33 : public base::RefCountedThreadSafe<SequencedWorkerPoolInner> { | 34 : public base::RefCountedThreadSafe<SequencedWorkerPoolInner> { |
34 public: | 35 public: |
35 SequencedWorkerPoolInner( | 36 SequencedWorkerPoolInner( |
36 size_t max_threads, const std::string& thread_name_prefix); | 37 size_t max_threads, const std::string& thread_name_prefix); |
37 | 38 |
38 SequencedWorkerPool::SequenceToken GetSequenceToken(); | 39 SequencedWorkerPool::SequenceToken GetSequenceToken(); |
39 | 40 |
40 SequencedWorkerPool::SequenceToken GetNamedSequenceToken( | 41 SequencedWorkerPool::SequenceToken GetNamedSequenceToken( |
41 const std::string& name); | 42 const std::string& name); |
42 | 43 |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 // Set when Shutdown is called to do some assertions. | 178 // Set when Shutdown is called to do some assertions. |
178 bool shutdown_called_; | 179 bool shutdown_called_; |
179 | 180 |
180 SequencedWorkerPool::TestingObserver* testing_observer_; | 181 SequencedWorkerPool::TestingObserver* testing_observer_; |
181 }; | 182 }; |
182 | 183 |
183 } // namespace internal | 184 } // namespace internal |
184 } // namespace base | 185 } // namespace base |
185 | 186 |
186 #endif // BASE_THREADING_SEQUENCED_WORKER_POOL_INNER_H_ | 187 #endif // BASE_THREADING_SEQUENCED_WORKER_POOL_INNER_H_ |
OLD | NEW |