17 #ifndef CARTOGRAPHER_COMMON_THREAD_POOL_H_ 18 #define CARTOGRAPHER_COMMON_THREAD_POOL_H_ 43 void Schedule(std::function<
void()> work_item);
50 std::vector<std::thread> pool_
GUARDED_BY(mutex_);
51 std::deque<std::function<void()>> work_queue_
GUARDED_BY(mutex_);
57 #endif // CARTOGRAPHER_COMMON_THREAD_POOL_H_
void Schedule(std::function< void()> work_item)
bool running_ GUARDED_BY(mutex_)
ThreadPool & operator=(const ThreadPool &)=delete
ThreadPool(int num_threads)