Prioritized task function object. More...
#include <task_adaptors.hpp>
Public Types | |
| typedef void | result_type |
| Indicates the functor's result type. | |
Public Member Functions | |
| void | operator() (void) const |
| bool | operator< (const prio_task_func &rhs) const |
| prio_task_func (unsigned int const priority, task_func const &function) | |
Private Attributes | |
| task_func | m_function |
| The task's function. | |
| unsigned int | m_priority |
| The priority of the task's function. | |
Prioritized task function object.
This function object wraps a task_func object and binds a priority to it. prio_task_funcs can be compared using the operator < which realises a partial ordering. The wrapped task function is invoked by calling the operator ().
Definition at line 51 of file task_adaptors.hpp.
| typedef void boost::threadpool::prio_task_func::result_type |
Indicates the functor's result type.
Definition at line 58 of file task_adaptors.hpp.
| boost::threadpool::prio_task_func::prio_task_func | ( | unsigned int const | priority, |
| task_func const & | function | ||
| ) | [inline] |
Constructor.
| priority | The priority of the task. |
| function | The task's function object. |
Definition at line 65 of file task_adaptors.hpp.
| void boost::threadpool::prio_task_func::operator() | ( | void | ) | const [inline] |
Executes the task function.
Definition at line 73 of file task_adaptors.hpp.
| bool boost::threadpool::prio_task_func::operator< | ( | const prio_task_func & | rhs | ) | const [inline] |
Comparison operator which realises a partial ordering based on priorities.
| rhs | The object to compare with. |
Definition at line 85 of file task_adaptors.hpp.
The task's function.
Definition at line 55 of file task_adaptors.hpp.
unsigned int boost::threadpool::prio_task_func::m_priority [private] |
The priority of the task's function.
Definition at line 54 of file task_adaptors.hpp.