| 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 1527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1538 return new PoolSequencedTaskRunner( | 1538 return new PoolSequencedTaskRunner( |
| 1539 this, token, shutdown_behavior); | 1539 this, token, shutdown_behavior); |
| 1540 } | 1540 } |
| 1541 | 1541 |
| 1542 scoped_refptr<TaskRunner> | 1542 scoped_refptr<TaskRunner> |
| 1543 SequencedWorkerPool::GetTaskRunnerWithShutdownBehavior( | 1543 SequencedWorkerPool::GetTaskRunnerWithShutdownBehavior( |
| 1544 WorkerShutdown shutdown_behavior) { | 1544 WorkerShutdown shutdown_behavior) { |
| 1545 return new SequencedWorkerPoolTaskRunner(this, shutdown_behavior); | 1545 return new SequencedWorkerPoolTaskRunner(this, shutdown_behavior); |
| 1546 } | 1546 } |
| 1547 | 1547 |
| 1548 bool SequencedWorkerPool::PostWorkerTask( |
| 1549 const tracked_objects::Location& from_here, |
| 1550 OnceClosure task) { |
| 1551 return inner_->PostTask(NULL, SequenceToken(), BLOCK_SHUTDOWN, from_here, |
| 1552 std::move(task), TimeDelta()); |
| 1553 } |
| 1554 |
| 1548 bool SequencedWorkerPool::PostWorkerTaskWithShutdownBehavior( | 1555 bool SequencedWorkerPool::PostWorkerTaskWithShutdownBehavior( |
| 1549 const tracked_objects::Location& from_here, | 1556 const tracked_objects::Location& from_here, |
| 1550 OnceClosure task, | 1557 OnceClosure task, |
| 1551 WorkerShutdown shutdown_behavior) { | 1558 WorkerShutdown shutdown_behavior) { |
| 1552 return inner_->PostTask(NULL, SequenceToken(), shutdown_behavior, from_here, | 1559 return inner_->PostTask(NULL, SequenceToken(), shutdown_behavior, from_here, |
| 1553 std::move(task), TimeDelta()); | 1560 std::move(task), TimeDelta()); |
| 1554 } | 1561 } |
| 1555 | 1562 |
| 1556 bool SequencedWorkerPool::PostSequencedWorkerTask( | 1563 bool SequencedWorkerPool::PostSequencedWorkerTask( |
| 1557 SequenceToken sequence_token, | 1564 SequenceToken sequence_token, |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1627 bool SequencedWorkerPool::IsShutdownInProgress() { | 1634 bool SequencedWorkerPool::IsShutdownInProgress() { |
| 1628 return inner_->IsShutdownInProgress(); | 1635 return inner_->IsShutdownInProgress(); |
| 1629 } | 1636 } |
| 1630 | 1637 |
| 1631 bool SequencedWorkerPool::IsRunningSequenceOnCurrentThread( | 1638 bool SequencedWorkerPool::IsRunningSequenceOnCurrentThread( |
| 1632 SequenceToken sequence_token) const { | 1639 SequenceToken sequence_token) const { |
| 1633 return inner_->IsRunningSequenceOnCurrentThread(sequence_token); | 1640 return inner_->IsRunningSequenceOnCurrentThread(sequence_token); |
| 1634 } | 1641 } |
| 1635 | 1642 |
| 1636 } // namespace base | 1643 } // namespace base |
| OLD | NEW |