Public Types | Public Member Functions | Private Attributes | List of all members
boost::threadpool::looped_task_func Class Reference

Looped task function object. More...

#include <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)
void operator() (void) const

Private Attributes

unsigned int m_break_ns
 Duration of breaks in nano seconds. More...
unsigned int m_break_s
 Duration of breaks in seconds. More...
function0< bool > m_function
 The task's function. More...

Detailed Description

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.

Member Typedef Documentation

Indicates the functor's result type.

Definition at line 115 of file task_adaptors.hpp.

Constructor & Destructor Documentation

boost::threadpool::looped_task_func::looped_task_func ( function0< bool > const &  function,
unsigned int const  interval = 0 


functionThe task's function object which is looped until false is returned.
intervalThe minimum break time in milli seconds before the first execution of the task function and between the following ones.

Definition at line 122 of file task_adaptors.hpp.

Member Function Documentation

void boost::threadpool::looped_task_func::operator() ( void  ) const

Executes the task function.

Definition at line 131 of file task_adaptors.hpp.

Member Data Documentation

unsigned int boost::threadpool::looped_task_func::m_break_ns

Duration of breaks in nano seconds.

Definition at line 112 of file task_adaptors.hpp.

unsigned int boost::threadpool::looped_task_func::m_break_s

Duration of breaks in seconds.

Definition at line 111 of file task_adaptors.hpp.

function0<bool> boost::threadpool::looped_task_func::m_function

The task's function.

Definition at line 110 of file task_adaptors.hpp.

The documentation for this class was generated from the following file:

Author(s): Allgeyer Tobias, Hutmacher Robin, Mei├čner Pascal
autogenerated on Mon Dec 16 2019 03:31:16