The Gaudi Framework
v29r0 (ff2e7097)
|
SchedulingPolicy which implements prioritized ordering. More...
#include <src/threadpool/boost/threadpool/scheduling_policies.hpp>
Public Types | |
typedef Task | task_type |
Indicates the scheduler's task type. More... | |
Public Member Functions | |
bool | push (task_type const &task) |
Adds a new task to the scheduler. More... | |
void | pop () |
Removes the task which should be executed next. More... | |
task_type const & | top () const |
Gets the task which should be executed next. More... | |
size_t | size () const |
Gets the current number of tasks in the scheduler. More... | |
bool | empty () const |
Checks if the scheduler is empty. More... | |
void | clear () |
Removes all tasks from the scheduler. More... | |
Protected Attributes | |
std::priority_queue< task_type > | m_container |
Internal task container. More... | |
SchedulingPolicy which implements prioritized ordering.
This container implements a scheduling policy based on task priorities. The task with highest priority will be the first to be removed. It must be possible to compare two tasks using operator<.
Task | A function object which implements the operator() and operator<. operator< must be a partial ordering. |
Definition at line 193 of file scheduling_policies.hpp.
typedef Task boost::threadpool::prio_scheduler< Task >::task_type |
Indicates the scheduler's task type.
Definition at line 196 of file scheduling_policies.hpp.
|
inline |
Removes all tasks from the scheduler.
Definition at line 248 of file scheduling_policies.hpp.
|
inline |
Checks if the scheduler is empty.
Definition at line 241 of file scheduling_policies.hpp.
|
inline |
Removes the task which should be executed next.
Definition at line 215 of file scheduling_policies.hpp.
|
inline |
Adds a new task to the scheduler.
task | The task object. |
Definition at line 207 of file scheduling_policies.hpp.
|
inline |
Gets the current number of tasks in the scheduler.
Definition at line 232 of file scheduling_policies.hpp.
|
inline |
Gets the task which should be executed next.
Definition at line 223 of file scheduling_policies.hpp.
|
protected |
Internal task container.
Definition at line 199 of file scheduling_policies.hpp.