10 #include <boost/asio.hpp>
11 #include <boost/any.hpp>
12 #include <boost/thread/thread.hpp>
17 typedef boost::shared_ptr<boost::asio::io_service::work>
workPtr;
30 void set(
const boost::any&
value) {
35 template <
typename TYPE>
38 while (
value.empty()) {
41 return value.empty() ? TYPE() : boost::any_cast<TYPE>(
value);
64 template <
typename FUNC>
67 io_service.post(boost::bind(&ThreadPool::execute<FUNC>,
this, func, future));
73 template <
typename FUNC>