Expand description
Abstraction over an executor so we can spawn tasks under Wasm the same way we do usually.
On non Wasm platforms, this re-exports parts of tokio directly. For Wasm, we provide a single-threaded solution that matches the interface that tokio provides as a drop in replacement.
Structs§
- Abort
Handle - An owned permission to abort a spawned task, without awaiting its completion.
- Abort
OnDrop - A type ensuring a task is aborted on drop.
- Handle
- Handle to the runtime.
- Join
Error - Task failed to execute to completion.
- Join
Handle - An owned permission to join on a task (await its termination).
- Runtime
- The Tokio runtime.
Traits§
- Join
Handle Ext - Trait to create an
AbortOnDrop
from aJoinHandle
.
Functions§
- spawn
- Spawns a new asynchronous task, returning a
JoinHandle
for it.