Stormancer::IScheduler Class Referenceabstract
A scheduler used to schedule network tasks. More...
#include <IScheduler.h>
Public Types | |
using | clock_type = std::chrono::steady_clock |
Public Member Functions | |
virtual void | schedulePeriodic (int delay, std::function< void()> work, pplx::cancellation_token ct=pplx::cancellation_token::none())=0 |
virtual void | schedulePeriodic (int delay, std::function< void()> work, std::shared_ptr< IActionDispatcher > dispatcher, pplx::cancellation_token ct=pplx::cancellation_token::none())=0 |
virtual void | schedule (clock_type::time_point when, std::function< void()> work, std::shared_ptr< IActionDispatcher > dispatcher=nullptr)=0 |
Detailed Description
A scheduler used to schedule network tasks.
Member Function Documentation
◆ schedule()
|
pure virtual |
Schedule a single-shot task at a given time point
- Parameters
-
dispatcher The dispatcher on which the work
will be run. Leave it tonullptr
to use the default dispatcher.
◆ schedulePeriodic() [1/2]
|
pure virtual |
Schedule a cancellable periodic task on the scheculder
- Parameters
-
delay milliseconds
◆ schedulePeriodic() [2/2]
|
pure virtual |
Schedule a cancellable periodic task on the scheculder
- Parameters
-
delay milliseconds
The documentation for this class was generated from the following file:
- stormancer/stormancer-sources/include/public/stormancer/IScheduler.h