threadpool | Overview | Reference | Tutorial | Examples | Design

Reference | Class List | Member Functions | Typedefs | File List

Public Types | Public Member Functions
boost::threadpool::prio_task_func Class Reference

List of all members.

## Public Types
typedef void | 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)

## 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
| ) |  |

Constructor.

Parameters:

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

Definition at line 65 of file task_adaptors.hpp.

## Member Function Documentation

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

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

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.

Copyright © 2005-2008 Philipp Henkel | Overview | Reference | Tutorial | Examples | Design