Module task

Module task 

Source
Expand description

Async rust task spawning and utilities that work natively (using tokio) and in browsers (using wasm-bindgen-futures).

Structs§

AbortHandle
An owned permission to abort a spawned task, without awaiting its completion.
AbortOnDropHandle
A wrapper around a tokio::task::JoinHandle, which aborts the task when it is dropped.
Id
An opaque ID that uniquely identifies a task relative to all other currently running tasks.
JoinError
Task failed to execute to completion.
JoinHandle
An owned permission to join on a task (await its termination).
JoinSet
A collection of tasks spawned on a Tokio runtime.

Functions§

spawn
Spawns a new asynchronous task, returning a JoinHandle for it.