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
9
10
//! Ex 047 — `FiberHandle` tracks completion / interruption.
use id_effect::{FiberHandle, FiberId, FiberStatus};

fn main() {
  let h = FiberHandle::<u8, ()>::pending(FiberId::fresh());
  assert_eq!(h.status(), FiberStatus::Running);
  h.mark_completed(Ok(7));
  assert_eq!(pollster::block_on(h.join()), Ok(7));
  println!("047_fiber_handle ok");
}