Public Member Functions | Private Member Functions | Private Attributes
cartographer::common::ThreadPool Class Reference

#include <thread_pool.h>

Inheritance diagram for cartographer::common::ThreadPool:
Inheritance graph
[legend]

List of all members.

Public Member Functions

ThreadPooloperator= (const ThreadPool &)
std::weak_ptr< TaskSchedule (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_

Detailed Description

Definition at line 57 of file thread_pool.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

Definition at line 78 of file thread_pool.cc.

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.


Member Data Documentation

Definition at line 75 of file thread_pool.h.


The documentation for this class was generated from the following files:


cartographer
Author(s): The Cartographer Authors
autogenerated on Thu May 9 2019 02:27:36