|
SatDump 2.0.0-alpha-520736c72
|
A simple thread pool running tasks sequentially in a single thread. More...
#include <task_queue.h>
Public Member Functions | |
| TaskQueue () | |
| Constructor, starts the internal thread. | |
| ~TaskQueue () | |
| Destructor. Waits for remaining tasks before exiting. | |
| void | push (std::function< void()> task) |
| Push a task in the queue. | |
A simple thread pool running tasks sequentially in a single thread.
This was mostly intended to act as a much more lightweight replacement for ctp_stl, as keeping threads lingering is not really that useful to simply run some small background jobs.
| void satdump::TaskQueue::push | ( | std::function< void()> | task | ) |
Push a task in the queue.
| task | the function to push |