Module task

Module task 

Source
Expand description

Defines Hermes-Five Runtime task runner.

Enums§

TaskResult
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§

TaskHandler
Represents an arc protected handler for a task.