Rolled handle infrastructure into rpcc.
[invirt/third/libt4.git] / rpc / thr_pool.h
index 5950a9c..9525032 100644 (file)
@@ -4,21 +4,21 @@
 #include "types.h"
 #include "fifo.h"
 
-typedef function<void()> job_t;
+typedef std::function<void()> job_t;
 
-class ThrPool {
+class thread_pool {
     public:
-        ThrPool(size_t sz, bool blocking=true);
-        ~ThrPool();
+        thread_pool(size_t sz, bool blocking=true);
+        ~thread_pool();
 
-        bool addJob(const job_t &j);
+        bool addJob(const job_t & j);
 
     private:
         size_t nthreads_;
         bool blockadd_;
 
         fifo<job_t> jobq_;
-        vector<thread> th_;
+        std::vector<thread> th_;
 
         void do_worker();
 };