id_effect 0.2.0

Effect<A, E, R> (sync + async), context/layers, pipe — interpreter-style, no bundled executor
Documentation
1
2
3
4
5
6
7
8
//! Ex 042 — `yield_now` cooperatively yields (thread yield here).
use id_effect::{ThreadSleepRuntime, run_blocking, yield_now};

fn main() {
  let rt = ThreadSleepRuntime;
  assert_eq!(run_blocking(yield_now(&rt), ()), Ok(()));
  println!("042_yield_now ok");
}