X-Git-Url: http://xvm.mit.edu/gitweb/invirt/third/libt4.git/blobdiff_plain/5a5c578e2e358a121cdb9234a6cb11c4ecfbf323..6623ac357055b95ce4fc0cbe9c5dc15524a9f20c:/rpc/thr_pool.h diff --git a/rpc/thr_pool.h b/rpc/thr_pool.h index 94ce237..28c5236 100644 --- a/rpc/thr_pool.h +++ b/rpc/thr_pool.h @@ -4,21 +4,21 @@ #include "types.h" #include "fifo.h" -typedef std::function job_t; +typedef function job_t; -class ThrPool { - public: - ThrPool(size_t sz, bool blocking=true); - ~ThrPool(); +class thread_pool { + public: + thread_pool(size_t sz, bool blocking=true); + ~thread_pool(); - bool addJob(const job_t &j); + bool addJob(const job_t &j); - private: + private: size_t nthreads_; - bool blockadd_; + bool blockadd_; - fifo jobq_; - std::vector th_; + fifo jobq_; + vector th_; void do_worker(); };