20 #include "google/protobuf/stubs/common.h" 27 namespace perception {
30 class ThreadPoolWorker;
40 void Add(google::protobuf::Closure *closure);
41 void Add(
const std::vector<google::protobuf::Closure *> &closures);
53 std::vector<ThreadPoolWorker *> workers_;
55 int num_available_workers_;
65 :
Thread(true,
"ThreadPoolWorker"), thread_pool_(thread_pool) {}
Definition: thread_pool.h:32
void Add(google::protobuf::Closure *closure)
ThreadPool(int num_workers)
virtual ~ThreadPoolWorker()
Definition: thread_pool.h:67
ThreadPoolWorker(ThreadPool *thread_pool)
Definition: thread_pool.h:64
friend class ThreadPoolWorker
Definition: thread_pool.h:51
Definition: concurrent_queue.h:89
int num_available_workers() const
Definition: thread_pool.h:45
int num_workers() const
Definition: thread_pool.h:43
ThreadPool & operator=(const ThreadPool &)=delete
Definition: thread_pool.h:62