20 #include "google/protobuf/stubs/callback.h" 21 #include "google/protobuf/stubs/common.h" 28 namespace perception {
31 class ThreadPoolWorker;
41 void Add(google::protobuf::Closure *closure);
42 void Add(
const std::vector<google::protobuf::Closure *> &closures);
54 std::vector<ThreadPoolWorker *> workers_;
56 int num_available_workers_;
66 :
Thread(true,
"ThreadPoolWorker"), thread_pool_(thread_pool) {}
Definition: thread_pool.h:33
void Add(google::protobuf::Closure *closure)
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
ThreadPool(int num_workers)
virtual ~ThreadPoolWorker()
Definition: thread_pool.h:68
ThreadPoolWorker(ThreadPool *thread_pool)
Definition: thread_pool.h:65
friend class ThreadPoolWorker
Definition: thread_pool.h:52
Definition: concurrent_queue.h:89
int num_available_workers() const
Definition: thread_pool.h:46
int num_workers() const
Definition: thread_pool.h:44
ThreadPool & operator=(const ThreadPool &)=delete
Definition: thread_pool.h:63