Reference | Class List | Member Functions | Typedefs | File List |
This container implements a FIFO scheduling policy. The first task to be added to the scheduler will be the first to be removed. The processing proceeds sequentially in the same order. FIFO stands for "first in, first out".
Task | A function object which implements the operator()(void). |
Definition at line 45 of file scheduling_policies.hpp.
Public Types | |
typedef Task | task_type |
Public Member Functions | |
void | clear () |
bool | empty () const |
void | pop () |
bool | push (task_type const &task) |
size_t | size () const |
task_type const & | top () const |
Protected Attributes | |
std::deque< task_type > | m_container |
typedef Task boost::threadpool::fifo_scheduler< Task >::task_type |
void boost::threadpool::fifo_scheduler< Task >::clear | ( | ) |
Removes all tasks from the scheduler.
Definition at line 100 of file scheduling_policies.hpp.
bool boost::threadpool::fifo_scheduler< Task >::empty | ( | ) | const |
Checks if the scheduler is empty.
Definition at line 93 of file scheduling_policies.hpp.
void boost::threadpool::fifo_scheduler< Task >::pop | ( | ) |
Removes the task which should be executed next.
Definition at line 67 of file scheduling_policies.hpp.
bool boost::threadpool::fifo_scheduler< Task >::push | ( | task_type const & | task | ) |
Adds a new task to the scheduler.
task | The task object. |
Definition at line 59 of file scheduling_policies.hpp.
size_t boost::threadpool::fifo_scheduler< Task >::size | ( | ) | const |
Gets the current number of tasks in the scheduler.
Definition at line 84 of file scheduling_policies.hpp.
task_type const& boost::threadpool::fifo_scheduler< Task >::top | ( | ) | const |
Gets the task which should be executed next.
Definition at line 75 of file scheduling_policies.hpp.
std::deque<task_type> boost::threadpool::fifo_scheduler< Task >::m_container [protected] |