SatDump 2.0.0-alpha-520736c72
Loading...
Searching...
No Matches
satdump::TaskQueue Class Reference

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.

Detailed Description

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.

Member Function Documentation

◆ push()

void satdump::TaskQueue::push ( std::function< void()> task)

Push a task in the queue.

Parameters
taskthe function to push

The documentation for this class was generated from the following files: