Crates.io | yielding-executor |
lib.rs | yielding-executor |
version | 0.10.0 |
source | src |
created_at | 2022-06-30 16:40:13.786755 |
updated_at | 2022-06-30 16:40:13.786755 |
description | Async executor with configurable yielding |
homepage | |
repository | https://github.com/wasmflow/yielding-executor |
max_upload_size | |
id | 616498 |
size | 43,921 |
This executor is a fork of wasm-rs-async-executor decoupled from wasm-bindgen.
There are a number of async task executors available in Rust's ecosystem. However, most (if not all?) of them rely on primitives that might not be available or optimal for WebAssembly deployment at the time and rely on the ability to monopolize a thread until completion. This crate gives you a simple executor that you can configure to yield in arbitrary ways.
Include this dependency in your Cargo.toml
:
[dependencies]
yielding-executor = "0.9.0"
yielding-executor
is expected to work on stable Rust, 1.49.0 and higher up.
This crate passes tests for wasm32-unknown-unknown
and wasm32-wasi
targets and should not really be used for anything else. There are better executors for other targets.
Please note that this library hasn't received much analysis in terms of safety
and soundness. Some of the caveats related to that might never be resolved
completely. This is an ongoing development and the maintainer is aware of
potential pitfalls. Any productive reports of unsafeties or unsoundness are
welcomed (whether they can be resolved or simply walled with unsafe
for end-user
to note).
Licensed under either of