16 #ifndef THREADPOOL_FUTURE_HPP_INCLUDED 17 #define THREADPOOL_FUTURE_HPP_INCLUDED 22 #include <boost/utility/enable_if.hpp> 30 namespace boost {
namespace threadpool
42 template<
class Result>
56 : m_impl(new detail::future_impl<future_result_type>())
68 return m_impl->ready();
78 return m_impl->timed_wait(timestamp);
93 return m_impl->cancel();
98 return m_impl->is_cancelled();
106 template<
class Pool,
class Function>
107 typename disable_if <
108 is_void< typename result_of< Function() >::type >,
143 #endif // THREADPOOL_FUTURE_HPP_INCLUDED
future(shared_ptr< detail::future_impl< Result > > const &impl)
The namespace threadpool contains a thread pool and related utility classes.
Experimental. Do not use in production code. TODO.
shared_ptr< detail::future_impl< Result > > m_impl
disable_if< is_void< typename result_of< Function() >::type >, future< typename result_of< Function() >::type >>::type schedule(Pool &pool, const Function &task)
Result future_result_type
Indicates the future's result type.
bool timed_wait(boost::xtime const ×tamp) const
Result const & result_type
Indicates the functor's result type.
bool is_cancelled() const