Expand description
Defines Hermes-Five Runtime task runner.
Enums§
- Task
Result - Represents the result of a TaskResult. A task may return either () or Result<(), Error> for flexibility which will be converted to TaskResult sent to the runtime.
Statics§
- RUNTIME_
RX - RUNTIME_
TX - Globally accessible runtime transmitter(TX)/receiver(RX) (not initialised yet)
Functions§
- init_
task_ channel - run
- Runs a given future as a Tokio task while ensuring the main function (marked by
#[hermes_five::runtime]) will not finish before all tasks running as done. This is done by using a globally accessible channel to communicate the handlers to be waited by the runtime.
Type Aliases§
- Task
Handler - Represents an arc protected handler for a task.