Task queue for the thread pool.The TaskQueue class represents the internal task container of a thread pool. It uses a FIFO (first in, first out) strategy to store and remove the assigned tasks.
More...
#include <TaskQueue.h>
|
typedef Tasks::size_type | SizeType |
| Size type of the task queue.
|
|
|
typedef std::deque< Task * > | Tasks |
| FIFO container for tasks.
|
|
Task queue for the thread pool.
The TaskQueue class represents the internal task container of a thread pool. It uses a FIFO (first in, first out) strategy to store and remove the assigned tasks.
blaze::threadpool::TaskQueue::~TaskQueue |
( |
| ) |
|
|
inline |
Destructor for the TaskQueue class.
The destructor destroys any remaining task in the task queue.
void blaze::threadpool::TaskQueue::clear |
( |
| ) |
|
|
inline |
Removing all tasks from the task queue.
- Returns
- void
bool blaze::threadpool::TaskQueue::isEmpty |
( |
| ) |
const |
|
inline |
Returns true if the task queue has no elements.
- Returns
- true if the task queue is empty, false if it is not.
Returns the maximum possible size of a task queue.
- Returns
- The maximum possible size.
TaskID blaze::threadpool::TaskQueue::pop |
( |
| ) |
|
|
inline |
Returns the task from the front of the task queue.
- Returns
- The first task in the task queue.
void blaze::threadpool::TaskQueue::push |
( |
TaskID |
task | ) |
|
|
inline |
Adding a task to the end of the task queue.
- Parameters
-
task | The task to be added to the end of the task queue. |
- Returns
- void
This function adds the given task to the end of the task queue. It runs in constant time.
Returns the current size of the task queue.
- Returns
- The current size.
This function returns the number of the currently contained tasks.
void blaze::threadpool::TaskQueue::swap |
( |
TaskQueue & |
tq | ) |
|
|
inline |
Swapping the contents of two task queues.
- Parameters
-
tq | The task queue to be swapped. |
- Returns
- void
- Exceptions
-
The documentation for this class was generated from the following file: