A wrapper class around an interface that provides a thread-safe access to the interface and allows to schedule arbitrary logic for it to retry until it succeeds.
More...
|
|
template<class FunctionT > |
| auto | execute (FunctionT &&exec_fn) |
| | A non-const variant of the executeImpl method. See it for details.
|
| |
|
template<class FunctionT > |
| auto | execute (FunctionT &&exec_fn) const |
| | A const variant of the executeImpl method. See it for details.
|
| |
| bool | isScheduled () const |
| | Check whether anything is scheduled for execution.
|
| |
| | RetryScheduler (std::unique_ptr< T > iface) |
| | Default constructor.
|
| |
| void | schedule (std::function< void(T &, SchedulerStopToken &stop_token)> exec_fn, const SchedulerOptions &options) |
| | Schedule an interface executor function to be executed at specified intervals.
|
| |
|
void | stop () |
| | Stop the scheduled function - will no longer be execute once THIS method returns.
|
| |
|
| ~RetryScheduler () |
| | A destructor that gracefully shuts down the thread.
|
| |
template<class T>
class display_device::RetryScheduler< T >
A wrapper class around an interface that provides a thread-safe access to the interface and allows to schedule arbitrary logic for it to retry until it succeeds.
- Note
- The scheduler is designed to only schedule 1 callback at a time, until it is either replaced or stopped.