Skip to main content

Module executor

Module executor 

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

AbortHandle
An owned permission to abort a spawned task, without awaiting its completion.
AbortOnDrop
A type ensuring a task is aborted on drop.
Handle
Handle to the runtime.
JoinErrorrt
Task failed to execute to completion.
JoinHandlert
An owned permission to join on a task (await its termination).
Runtime
The Tokio runtime.

Traits§

JoinHandleExt
Trait to create an AbortOnDrop from a JoinHandle.

Functions§

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