#include <thread_pool.h>

Public Member Functions | |
| ThreadPool & | operator= (const ThreadPool &) |
| std::weak_ptr< Task > | Schedule (std::unique_ptr< Task > task) LOCKS_EXCLUDED(mutex_) override |
| ThreadPool (int num_threads) | |
| ThreadPool (const ThreadPool &) | |
| ~ThreadPool () | |
Private Member Functions | |
| void | DoWork () |
| bool running_ | GUARDED_BY (mutex_) |
| std::vector< std::thread > pool_ | GUARDED_BY (mutex_) |
| std::deque< std::shared_ptr < Task > > task_queue_ | GUARDED_BY (mutex_) |
| absl::flat_hash_map< Task *, std::shared_ptr< Task > > tasks_not_ready_ | GUARDED_BY (mutex_) |
| void | NotifyDependenciesCompleted (Task *task) LOCKS_EXCLUDED(mutex_) override |
Private Attributes | |
| absl::Mutex | mutex_ |
Definition at line 57 of file thread_pool.h.
| cartographer::common::ThreadPool::ThreadPool | ( | int | num_threads | ) | [explicit] |
Definition at line 39 of file thread_pool.cc.
Definition at line 46 of file thread_pool.cc.
| void cartographer::common::ThreadPool::DoWork | ( | ) | [private] |
Definition at line 78 of file thread_pool.cc.
| bool running_ cartographer::common::ThreadPool::GUARDED_BY | ( | mutex_ | ) | [private] |
| std::vector<std::thread> pool_ cartographer::common::ThreadPool::GUARDED_BY | ( | mutex_ | ) | [private] |
| std::deque<std::shared_ptr<Task> > task_queue_ cartographer::common::ThreadPool::GUARDED_BY | ( | mutex_ | ) | [private] |
| absl::flat_hash_map<Task*, std::shared_ptr<Task> > tasks_not_ready_ cartographer::common::ThreadPool::GUARDED_BY | ( | mutex_ | ) | [private] |
| void cartographer::common::ThreadPool::NotifyDependenciesCompleted | ( | Task * | task | ) | [override, private, virtual] |
Implements cartographer::common::ThreadPoolInterface.
Definition at line 57 of file thread_pool.cc.
| ThreadPool& cartographer::common::ThreadPool::operator= | ( | const ThreadPool & | ) |
| std::weak_ptr< Task > cartographer::common::ThreadPool::Schedule | ( | std::unique_ptr< Task > | task | ) | [override, virtual] |
Implements cartographer::common::ThreadPoolInterface.
Definition at line 65 of file thread_pool.cc.
absl::Mutex cartographer::common::ThreadPool::mutex_ [private] |
Definition at line 75 of file thread_pool.h.