The Gaudi Framework
v29r0 (ff2e7097)
|
Looped task function object. More...
#include <src/threadpool/boost/threadpool/task_adaptors.hpp>
Public Types | |
typedef void | result_type |
Indicates the functor's result type. More... | |
Public Member Functions | |
looped_task_func (function0< bool > const &function, unsigned int const interval=0) | |
Constructor. More... | |
void | operator() (void) const |
Executes the task function. More... | |
Private Attributes | |
function0< bool > | m_function |
The task's function. More... | |
unsigned int | m_break_s |
Duration of breaks in seconds. More... | |
unsigned int | m_break_ns |
Duration of breaks in nano seconds. More... | |
Looped task function object.
This function object wraps a boolean thread function object. The wrapped task function is invoked by calling the operator () and it is executed in regular time intervals until false is returned. The interval length may be zero. Please note that a pool's thread is engaged as long as the task is looped.
Definition at line 107 of file task_adaptors.hpp.
typedef void boost::threadpool::looped_task_func::result_type |
Indicates the functor's result type.
Definition at line 118 of file task_adaptors.hpp.
|
inline |
Constructor.
function | The task's function object which is looped until false is returned. |
interval | The minimum break time in milli seconds before the first execution of the task function and between the following ones. |
Definition at line 125 of file task_adaptors.hpp.
|
inline |
Executes the task function.
Definition at line 139 of file task_adaptors.hpp.
|
private |
Duration of breaks in nano seconds.
Definition at line 115 of file task_adaptors.hpp.
|
private |
Duration of breaks in seconds.
Definition at line 114 of file task_adaptors.hpp.
|
private |
The task's function.
Definition at line 110 of file task_adaptors.hpp.