|
FERS 1.0.0
The Flexible Extensible Radar Simulator
|
A thread-safe wrapper for the simulation progress callback. More...
#include "sim_threading.h"
Public Types | |
| using | Callback = std::function< void(const std::string &, int, int)> |
| Defines the signature for the progress reporting callback function. | |
Public Member Functions | |
| ProgressReporter (Callback cb) | |
| Constructs a ProgressReporter with the given callback. | |
| void | report (const std::string &msg, int current, int total) |
| Safely reports progress to the underlying callback. | |
A thread-safe wrapper for the simulation progress callback.
Allows multiple worker threads to report progress concurrently without race conditions.
Definition at line 56 of file sim_threading.h.
Defines the signature for the progress reporting callback function.
Definition at line 63 of file sim_threading.h.
|
explicit |
Constructs a ProgressReporter with the given callback.
| cb | The callback function to wrap. |
Definition at line 69 of file sim_threading.h.
| void core::ProgressReporter::report | ( | const std::string & | msg, |
| int | current, | ||
| int | total | ||
| ) |
Safely reports progress to the underlying callback.
| msg | The status message to report. |
| current | The current progress value. |
| total | The total progress value. |
Definition at line 77 of file sim_threading.h.