17 #ifndef CARTOGRAPHER_COMMON_THREAD_POOL_H_ 18 #define CARTOGRAPHER_COMMON_THREAD_POOL_H_ 24 #include <unordered_map> 39 virtual std::weak_ptr<Task>
Schedule(std::unique_ptr<Task> task) = 0;
67 std::weak_ptr<Task>
Schedule(std::unique_ptr<Task> task)
77 std::vector<std::thread> pool_
GUARDED_BY(mutex_);
86 #endif // CARTOGRAPHER_COMMON_THREAD_POOL_H_
virtual ~ThreadPoolInterface()
virtual void NotifyDependenciesCompleted(Task *task)=0
std::map< Task *, std::shared_ptr< Task > > tasks_not_ready_
void SetThreadPool(Task *task)
std::deque< std::shared_ptr< Task > > task_queue_
virtual std::weak_ptr< Task > Schedule(std::unique_ptr< Task > task)=0