vthread 0.0.1

Bounded carrier-affine virtual threads for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
#[test]
fn admission_counts_do_not_depend_on_join_observation() {
    let runtime = crate::Runtime::new().unwrap();
    runtime
        .run_scope(|scope| {
            drop(scope.spawn("unobserved", || ())?);
            Ok(())
        })
        .unwrap();
    assert_eq!(runtime.snapshot().stats().admitted(), 1);
    assert_eq!(runtime.snapshot().stats().completed(), 1);
}