TwiceAsNice
2019-02-18
|
SchedulingPolicy which implements LIFO 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) |
TaskType | pop () |
size_t | size () const |
bool | empty () const |
void | clear () |
bool | push (TaskType const &task) |
TaskType | pop () |
size_t | size () const |
bool | empty () const |
void | clear () |
Protected Attributes | |
std::deque< TaskType > | m_container |
Internal task container. More... | |
Nice::Mutex | m_mutex |
SchedulingPolicy which implements LIFO ordering.
This container implements a LIFO scheduling policy. The last task to be added to the scheduler will be the first to be removed. LIFO stands for "last in, first out".
Task | A function object which implements the operator()(void). |
typedef Task Nice::DispatcherSchedulerLifo< Task >::TaskType |
Indicates the scheduler's task type.
typedef Task Nice::DispatcherSchedulerLifo< 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 |
|
protected |
Internal task container.
|
protected |