17 #ifndef THREADPOOL_TASK_ADAPTERS_HPP_INCLUDED 18 #define THREADPOOL_TASK_ADAPTERS_HPP_INCLUDED 21 #include <boost/smart_ptr.hpp> 22 #include <boost/function.hpp> 23 #include <boost/thread.hpp> 26 namespace boost {
namespace threadpool
66 : m_priority(priority)
67 , m_function(function)
123 : m_function(function)
125 m_break_s = interval / 1000;
126 m_break_ns = (interval - m_break_s * 1000) * 1000 * 1000;
135 if(m_break_s > 0 || m_break_ns > 0)
138 xtime_get(&xt, TIME_UTC);
139 xt.nsec += m_break_ns;
146 if(m_break_s > 0 || m_break_ns > 0)
149 xtime_get(&xt, TIME_UTC);
150 xt.nsec += m_break_ns;
167 #endif // THREADPOOL_TASK_ADAPTERS_HPP_INCLUDED task_func m_function
The task's function.
The namespace threadpool contains a thread pool and related utility classes.
void result_type
Indicates the functor's result type.
unsigned int m_priority
The priority of the task's function.
prio_task_func(unsigned int const priority, task_func const &function)
Looped task function object.
function0< bool > m_function
The task's function.
bool operator<(const prio_task_func &rhs) const
void operator()(void) const
void result_type
Indicates the functor's result type.
looped_task_func(function0< bool > const &function, unsigned int const interval=0)
unsigned int m_break_ns
Duration of breaks in nano seconds.
unsigned int m_break_s
Duration of breaks in seconds.
Prioritized task function object.
function0< void > task_func
Standard task function object.