Crate async_wasm_task

Source
Expand description

async_wasm_task is a Rust library that enables seamless integration of asynchronous Rust tasks and Futures in JavaScript, resembling the familiar tokio::task patterns. It leverages web workers to execute tasks in parallel, making it ideal for high-performance web applications.

Structs§

JoinError
Returned when a task failed to execute to completion.
JoinHandle
An owned permission to join on a task (awaiting its termination).

Functions§

spawn
Spawns a new asynchronous task, returning a JoinHandle for it.
spawn_blocking
Runs the provided closure on a web worker(thread) where blocking is acceptable.
yield_now
Yields execution back to the JavaScript event loop.