A signal that can be sent from an awaitable to the Task and Scheduler.
More...
#include <CoSignal.hpp>
A signal that can be sent from an awaitable to the Task and Scheduler.
Enables stuff like:
and internally Delay sends an AwaitableNode::await_suspend_signal().
- See also
- AwaitableNode
-
Delay
-
NextCycle
◆ Type
Type of the contained signal.
| Enumerator |
|---|
| None | |
| Await | |
| NextCycle | |
| ImplicitDelay | |
| ExplicitDelay | |
◆ await()
Send an await signal to the Task/Scheduler. The Coroutine is waiting on an external event (Hardware/IO/other task/etc.)
◆ deadline()
get the explicit delay time
- Returns
- the implicit delay time
- Exceptions
-
| If | ASSERTION_LEVEL_O1 or higher is enabled: throws an AssertionFailure, if the signal does not hold an explicit delay |
◆ delay()
get the implicit delay time
- Returns
- the implicit delay time
- Exceptions
-
| If | ASSERTION_LEVEL_O1 or higher is enabled: throws an AssertionFailure, if the signal does not hold an implicit delay |
◆ explicit_delay()
Suspend execution and delay the next schedule.
- Parameters
-
| delay | time in ns relative to now |
| rel_deadline | time in ns relative to the resulting ready time |
◆ implicit_delay()
Suspend execution and delay the next schedule.
- Parameters
-
| delay | time in ns relative from now |
◆ next_cycle()
| CoSignal & fiber::CoSignal::next_cycle |
( |
| ) |
|
|
inlineconstexpr |
Send the completion of this cycle and trigger the recalculation of the next one.
◆ none()
Send no signal to the Task/Scheduler or clear the previous one.
◆ type()
| Type fiber::CoSignal::type |
( |
| ) |
const |
|
inlineconstexpr |
Get the signal type.
- Returns
- An enum Type
The documentation for this class was generated from the following file: