TwiceAsNice
2019-02-18
|
SchedulingPolicy which implements prioritized ordering. More...
#include <DispatcherScheduler.hh>
Public Types | |
typedef Task | TaskType |
Indicates the scheduler's task type. More... | |
typedef Task | TaskType |
Indicates the scheduler's task type. More... | |
Public Member Functions | |
bool | push (TaskType const &task) |
bool | pop (TaskType &_task) |
size_t | size () const |
bool | empty () const |
void | clear () |
bool | push (TaskType const &task) |
bool | pop (TaskType &_task) |
size_t | size () const |
bool | empty () const |
void | clear () |
Private Attributes | |
std::priority_queue< TaskType > | m_container |
Internal task container. More... | |
Nice::Mutex | m_mutex |
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. |
typedef Task Nice::DispatcherSchedulerPrio< Task >::TaskType |
Indicates the scheduler's task type.
typedef Task Nice::DispatcherSchedulerPrio< Task >::TaskType |
Indicates the scheduler's task type.
|
inline |
Removes all tasks from the scheduler.
|
inline |
Removes all tasks from the scheduler.
|
inline |
Checks if the scheduler is empty.
|
inline |
Checks if the scheduler is empty.
|
inline |
Gets the task which should be executed next and remove it.
|
inline |
Gets the task which should be executed next and remove it.
|
inline |
Adds a new task to the scheduler.
task | The task object. |
|
inline |
Adds a new task to the scheduler.
task | The task object. |
|
inline |
|
inline |
|
private |
Internal task container.
|
private |