![]() |
libdisplaydevice v2026.322.2407
C++ library to modify display devices.
|
A convenience class for stopping the RetryScheduler. More...
#include <src/common/include/display_device/retry_scheduler.h>
Public Member Functions | |
| SchedulerStopToken & | operator= (const SchedulerStopToken &)=delete |
| Deleted copy operator. | |
| void | requestStop () |
| Request the scheduler to be stopped. | |
| SchedulerStopToken (const SchedulerStopToken &)=delete | |
| Deleted copy constructor. | |
| SchedulerStopToken (std::function< void()> cleanup) | |
| Default constructor. | |
| bool | stopRequested () const |
| Check if stop was requested. | |
| ~SchedulerStopToken () | |
| Executes cleanup logic if scheduler stop was requested. | |
A convenience class for stopping the RetryScheduler.
It is conceptually similar to std::stop_token except that it also uses RAII to perform a cleanup. This allows to return void types in the RetryScheduler without a hassle.
|
explicit |
Default constructor.
| cleanup | Function to be executed once the destructor is called (object goes out of scope). |
|
nodiscard |
Check if stop was requested.