Expand description
Task module for spawning async tasks in WASM environment.
Structs§
- Join
Handle - JoinHandle wraps a oneshot::Receiver for obtaining the task’s result, along with an AbortHandle to allow the task to be aborted.
Enums§
- Join
Error - Error type returned when awaiting a spawned task.
Functions§
- spawn
- Spawns a future as an abortable task. In WASM, spawn and spawn_local are equivalent.
- spawn_
blocking - Spawns a blocking task by wrapping the blocking function in an async block. In WASM this is equivalent to spawn_local since true blocking cannot be offloaded to another thread.
- spawn_
local - Spawns a future as an abortable task using spawn_local. This function is equivalent to tokio’s spawn_local.