X-Git-Url: http://xvm.mit.edu/gitweb/invirt/third/libt4.git/blobdiff_plain/dfe8486473094c0769fd1922329c3f0dfd8f43c0..be7cf844f59fa483423724e8e4b5e663e5b88ddd:/rpc/thr_pool.h diff --git a/rpc/thr_pool.h b/rpc/thr_pool.h index 2a1a749..5b95cba 100644 --- a/rpc/thr_pool.h +++ b/rpc/thr_pool.h @@ -1,26 +1,24 @@ #ifndef thr_pool_h #define thr_pool_h -#include -#include - +#include "types.h" #include "fifo.h" -typedef std::function job_t; +typedef function job_t; class ThrPool { public: - ThrPool(int sz, bool blocking=true); + ThrPool(size_t sz, bool blocking=true); ~ThrPool(); bool addJob(const job_t &j); private: - int nthreads_; + size_t nthreads_; bool blockadd_; fifo jobq_; - std::vector th_; + vector th_; void do_worker(); };