Toolbox snapshot
The Reactive C++ Toolbox
|
A vector-based task queue for use in multi-threaded, producer-consumer components. More...
#include <toolbox/util/TaskQueue.hpp>
Public Member Functions | |
TaskQueue ()=default | |
~TaskQueue ()=default | |
TaskQueue (const TaskQueue &)=delete | |
TaskQueue & | operator= (const TaskQueue &)=delete |
TaskQueue (TaskQueue &&)=delete | |
TaskQueue & | operator= (TaskQueue &&)=delete |
template<typename FnT > | |
bool | run (FnT fn) |
void | stop () |
Interrupt and exit any inprogress call to run(). | |
void | clear () noexcept |
Clear task queue. | |
bool | push (TaskT &&task) noexcept |
Push task onto the task queue. | |
A vector-based task queue for use in multi-threaded, producer-consumer components.
Definition at line 28 of file TaskQueue.hpp.
|
default |
|
default |
|
delete |
|
delete |
|
delete |
|
delete |
|
inline |
Wait for and execute the next task in the queue.
Definition at line 47 of file TaskQueue.hpp.
|
inline |
Interrupt and exit any inprogress call to run().
Definition at line 70 of file TaskQueue.hpp.
|
inlinenoexcept |
Clear task queue.
Definition at line 79 of file TaskQueue.hpp.
|
inlinenoexcept |
Push task onto the task queue.
Definition at line 86 of file TaskQueue.hpp.