X-Git-Url: http://xvm.mit.edu/gitweb/invirt/third/libt4.git/blobdiff_plain/f2170465073de34adf89161d4287182b518352c4..3abd3952c1f4441f0dd6eae9883b2d01ed9cd56b:/rpc/thr_pool.h?ds=inline diff --git a/rpc/thr_pool.h b/rpc/thr_pool.h index 4ea1bd4..5950a9c 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(size_t sz, bool blocking=true); - ~ThrPool(); + public: + ThrPool(size_t sz, bool blocking=true); + ~ThrPool(); - 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(); };