| The Gaudi Framework v29r0 (ff2e7097)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

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

Prioritized 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
| prio_task_func (unsigned int const priority, task_func const &function)
| Constructor. More...
void | operator() (void) const
| Executes the task function. More...
bool | operator< (const prio_task_func &rhs) const
| Comparison operator which realises a partial ordering based on priorities. More...

## Private Attributes
unsigned int | m_priority
| The priority of the task's function. More...
task_func | m_function
| The task's function. More...

## Detailed Description

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 ().

See also
  prio_scheduler

Definition at line 51 of file task_adaptors.hpp.

## Member Typedef Documentation

typedef void boost::threadpool::prio_task_func::result_type

Indicates the functor's result type.

Definition at line 58 of file task_adaptors.hpp.

## Constructor & Destructor Documentation

boost::threadpool::prio_task_func::prio_task_func | ( | unsigned int const | priority,
|  | task_func const & | function
| ) |  |
| inline

Constructor.

Parameters

  priority | The priority of the task.
  function | The task's function object.

Definition at line 65 of file task_adaptors.hpp.

66 : m_priority(priority)
67 , m_function(function)
68 {
69 }
boost::threadpool::prio_task_func::m_function
task_func m_function
The task&#39;s function.
Definition: task_adaptors.hpp:55
boost::threadpool::prio_task_func::m_priority
unsigned int m_priority
The priority of the task&#39;s function.
Definition: task_adaptors.hpp:54

## Member Function Documentation

void boost::threadpool::prio_task_func::operator() | ( | void |  | ) | const
| inline

Executes the task function.

Definition at line 73 of file task_adaptors.hpp.

74 {
75 if(m_function)
76 {
77 m_function();
78 }
79 }
boost::threadpool::prio_task_func::m_function
task_func m_function
The task&#39;s function.
Definition: task_adaptors.hpp:55

bool boost::threadpool::prio_task_func::operator< | ( | const prio_task_func & | rhs | ) | const
| inline

Comparison operator which realises a partial ordering based on priorities.

Parameters

  rhs | The object to compare with.

Returns
  true if the priority of *this is less than right hand side's priority, false otherwise.

Definition at line 85 of file task_adaptors.hpp.

86 {
87 return m_priority < rhs.m_priority;
88 }
boost::threadpool::prio_task_func::m_priority
unsigned int m_priority
The priority of the task&#39;s function.
Definition: task_adaptors.hpp:54

## Member Data Documentation

task_func boost::threadpool::prio_task_func::m_function
| private

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.

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

- GaudiMTTools/src/threadpool/boost/threadpool/task_adaptors.hpp