| 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> |
| (...skipping 1202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1213 const std::string& thread_name_prefix, | 1213 const std::string& thread_name_prefix, |
| 1214 base::TaskPriority task_priority) | 1214 base::TaskPriority task_priority) |
| 1215 : constructor_task_runner_(ThreadTaskRunnerHandle::Get()), | 1215 : constructor_task_runner_(ThreadTaskRunnerHandle::Get()), |
| 1216 inner_(new Inner(this, | 1216 inner_(new Inner(this, |
| 1217 max_threads, | 1217 max_threads, |
| 1218 thread_name_prefix, | 1218 thread_name_prefix, |
| 1219 task_priority, | 1219 task_priority, |
| 1220 NULL)) {} | 1220 NULL)) {} |
| 1221 | 1221 |
| 1222 SequencedWorkerPool::SequencedWorkerPool(size_t max_threads, | 1222 SequencedWorkerPool::SequencedWorkerPool(size_t max_threads, |
| 1223 const std::string& thread_name_prefix) | |
| 1224 : SequencedWorkerPool(max_threads, | |
| 1225 thread_name_prefix, | |
| 1226 base::TaskPriority::USER_VISIBLE) {} | |
| 1227 | |
| 1228 SequencedWorkerPool::SequencedWorkerPool(size_t max_threads, | |
| 1229 const std::string& thread_name_prefix, | 1223 const std::string& thread_name_prefix, |
| 1230 base::TaskPriority task_priority, | 1224 base::TaskPriority task_priority, |
| 1231 TestingObserver* observer) | 1225 TestingObserver* observer) |
| 1232 : constructor_task_runner_(ThreadTaskRunnerHandle::Get()), | 1226 : constructor_task_runner_(ThreadTaskRunnerHandle::Get()), |
| 1233 inner_(new Inner(this, | 1227 inner_(new Inner(this, |
| 1234 max_threads, | 1228 max_threads, |
| 1235 thread_name_prefix, | 1229 thread_name_prefix, |
| 1236 task_priority, | 1230 task_priority, |
| 1237 observer)) {} | 1231 observer)) {} |
| 1238 | 1232 |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1364 void SequencedWorkerPool::Shutdown(int max_new_blocking_tasks_after_shutdown) { | 1358 void SequencedWorkerPool::Shutdown(int max_new_blocking_tasks_after_shutdown) { |
| 1365 DCHECK(constructor_task_runner_->BelongsToCurrentThread()); | 1359 DCHECK(constructor_task_runner_->BelongsToCurrentThread()); |
| 1366 inner_->Shutdown(max_new_blocking_tasks_after_shutdown); | 1360 inner_->Shutdown(max_new_blocking_tasks_after_shutdown); |
| 1367 } | 1361 } |
| 1368 | 1362 |
| 1369 bool SequencedWorkerPool::IsShutdownInProgress() { | 1363 bool SequencedWorkerPool::IsShutdownInProgress() { |
| 1370 return inner_->IsShutdownInProgress(); | 1364 return inner_->IsShutdownInProgress(); |
| 1371 } | 1365 } |
| 1372 | 1366 |
| 1373 } // namespace base | 1367 } // namespace base |
| OLD | NEW |