18 #ifndef THREADPOOL_POOL_ADAPTORS_HPP_INCLUDED 19 #define THREADPOOL_POOL_ADAPTORS_HPP_INCLUDED 21 #include <boost/smart_ptr.hpp> 24 namespace boost {
namespace threadpool
35 template<
typename Pool,
typename Runnable>
38 return pool->schedule(bind(&Runnable::run, obj));
44 template<
typename Pool>
51 return pool.schedule(task);
55 template<
typename Pool>
57 is_void< typename result_of< typename Pool::task_type() >::type >,
60 schedule(shared_ptr<Pool>
const pool,
typename Pool::task_type
const & task)
62 return pool->schedule(task);
68 #endif // THREADPOOL_POOL_ADAPTORS_HPP_INCLUDED The namespace threadpool contains a thread pool and related utility classes.
disable_if< is_void< typename result_of< Function() >::type >, future< typename result_of< Function() >::type >>::type schedule(Pool &pool, const Function &task)