Fixed two major bugs in paxos.cc.
[invirt/third/libt4.git] / rpc / thr_pool.h
index 4ea1bd4..5950a9c 100644 (file)
@@ -1,26 +1,24 @@
 #ifndef thr_pool_h
 #define thr_pool_h
 
-#include <vector>
-#include <thread>
-
+#include "types.h"
 #include "fifo.h"
 
-typedef std::function<void()> job_t;
+typedef function<void()> 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<job_t> jobq_;
-               std::vector<std::thread> th_;
+        fifo<job_t> jobq_;
+        vector<thread> th_;
 
         void do_worker();
 };