#include <Delay.hpp>
|
| constexpr | Delay (fiber::Duration delay) |
| | Constructs a delay that can be co_awaited and sends a signal to the scheduler for re-scheduling.
|
| |
| template<RoundingMethod rounding_type = RoundingMethod::Up, class Rep = unsigned int, CRatio Period = std::ratio<1>> |
| constexpr | Delay (std::chrono::duration< Rep, Period > delay) |
| | Constructs a delay that can be co_awaited and sends a signal to the scheduler for re-scheduling with exposed rounding type
|
| |
| constexpr | Delay (fiber::Duration delay, fiber::Duration relative_deadline) |
| | Constructs a delay that can be co_awaited and sends a signal to the scheduler for re-scheduleing.
|
| |
| constexpr bool | await_ready () const noexcept |
| | return true if the awatiable is ready.
|
| |
| constexpr void | await_resume () const noexcept |
| | A delay does not return a value to be read -> void
|
| |
| template<class ReturnType> |
| constexpr void | await_suspend (std::coroutine_handle< fiber::CoroutinePromise< ReturnType > > handle) const noexcept |
| |
◆ Delay() [1/3]
Constructs a delay that can be co_awaited and sends a signal to the scheduler for re-scheduling.
Re-schedules the task with the delay relative to now and infers the deadline from the previous execution.
The next ready time:
next_ready = Clock::now() + delay;
The next deadline:
next_deadline = Clock::now() + delay + (previous_deadline - previous_ready)
- See also
- CoSignal::ImplicitDelay
- Parameters
-
| delay | The delay by which the task will be re-scheduled |
◆ Delay() [2/3]
template<
RoundingMethod rounding_type = RoundingMethod::Up, class Rep = unsigned int, CRatio Period = std::ratio<1>>
| fiber::Delay::Delay |
( |
std::chrono::duration< Rep, Period > | delay | ) |
|
|
inlineconstexpr |
Constructs a delay that can be co_awaited and sends a signal to the scheduler for re-scheduling with exposed rounding type
◆ Delay() [3/3]
Constructs a delay that can be co_awaited and sends a signal to the scheduler for re-scheduleing.
Re-schedules the task with the delay relative to now and the relative_deadline relative to the new ready time.
The next ready time:
next_ready = Clock::now() + delay;
The next deadline:
next_deadline = Clock::now() + delay + relative_deadline
- Parameters
-
| delay | The delay by which this task should be delayed |
| relative_deadline | The added deadline after the delay |
- See also
- CoSignal::ExplicitDelay
◆ await_ready()
| bool fiber::Delay::await_ready |
( |
| ) |
const |
|
inlineconstexprnoexcept |
return true if the awatiable is ready.
initially returns false on the first read, but true on the second. _ready is set true in await_suspend_signal()
◆ await_resume()
| void fiber::Delay::await_resume |
( |
| ) |
const |
|
inlineconstexprnoexcept |
A delay does not return a value to be read -> void
◆ await_suspend()
template<class ReturnType>
The documentation for this class was generated from the following file: