30 #include <boost/thread/condition_variable.hpp>
31 #include <boost/thread/mutex.hpp>
32 #include <boost/thread/thread.hpp>
57 boost::condition_variable cv;
70 void submit(waiter *waiter, std::function<
void()> f,
bool leaf =
false);
78 typedef struct entry {
80 std::function<void()> f;
83 std::deque<entry> queue;
84 boost::condition_variable has_work;
86 std::vector<boost::thread> threads;
90 void run(
bool flush =
false);