OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/worker_pool_posix.h" | 5 #include <stdbool.h> |
| 6 #include <stddef.h> |
| 7 #include <queue> |
| 8 #include <string> |
6 | 9 |
| 10 #include "base/basictypes.h" |
7 #include "base/lazy_instance.h" | 11 #include "base/lazy_instance.h" |
8 #include "base/logging.h" | 12 #include "base/logging.h" |
9 #include "base/ref_counted.h" | 13 #include "base/ref_counted.h" |
| 14 #include "base/scoped_ptr.h" |
10 #include "base/stringprintf.h" | 15 #include "base/stringprintf.h" |
| 16 #include "base/synchronization/condition_variable.h" |
| 17 #include "base/synchronization/lock.h" |
11 #include "base/task.h" | 18 #include "base/task.h" |
12 #include "base/threading/platform_thread.h" | 19 #include "base/threading/platform_thread.h" |
13 #include "base/threading/worker_pool.h" | 20 #include "base/threading/worker_pool.h" |
| 21 #include "base/threading/worker_pool_posix.h" |
| 22 #include "base/time.h" |
| 23 |
| 24 namespace tracked_objects { class Location; } |
14 | 25 |
15 namespace base { | 26 namespace base { |
16 | 27 |
17 namespace { | 28 namespace { |
18 | 29 |
19 const int kIdleSecondsBeforeExit = 10 * 60; | 30 const int kIdleSecondsBeforeExit = 10 * 60; |
20 // A stack size of 64 KB is too small for the CERT_PKIXVerifyCert | 31 // A stack size of 64 KB is too small for the CERT_PKIXVerifyCert |
21 // function of NSS because of NSS bug 439169. | 32 // function of NSS because of NSS bug 439169. |
22 const int kWorkerThreadStackSize = 128 * 1024; | 33 const int kWorkerThreadStackSize = 128 * 1024; |
23 | 34 |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 return NULL; | 171 return NULL; |
161 } | 172 } |
162 } | 173 } |
163 | 174 |
164 Task* task = tasks_.front(); | 175 Task* task = tasks_.front(); |
165 tasks_.pop(); | 176 tasks_.pop(); |
166 return task; | 177 return task; |
167 } | 178 } |
168 | 179 |
169 } // namespace base | 180 } // namespace base |
OLD | NEW |