Skip to main content

Crate spawned_rt

Crate spawned_rt 

Source
Expand description

Runtime abstraction layer for spawned.

This crate wraps tokio and standard library primitives behind a uniform interface. Users typically don’t depend on spawned-rt types directly — the relevant re-exports (run, CancellationToken, etc.) are available through spawned_concurrency::tasks and spawned_concurrency::threads.

§Modules

  • tasks — async runtime backed by tokio: run(), spawn(), CancellationToken, mpsc, oneshot, watch, timeout, sleep
  • threads — blocking runtime using OS threads: CancellationToken, mpsc, oneshot, sleep

Modules§

tasks
Runtime wrapper to remove dependencies from code. Using this library will allow to set a tokio runtime or any other runtime, once implemented just by changing the enabled feature. May implement the deterministic version based on comonware.xyz’s runtime: https://github.com/commonwarexyz/monorepo/blob/main/runtime/src/deterministic.rs
threads
IO-threads based module to support shared behavior with task based version.