ste 0.1.0-alpha.11

A single-threaded executor with some tricks up its sleeve.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#[tokio::main(flavor = "current_thread")]
async fn main() -> anyhow::Result<()> {
    let thread = ste::Builder::new().with_tokio().build()?;

    let mut result = 0u32;

    thread
        .submit_async(async {
            tokio::time::sleep(std::time::Duration::from_secs(1)).await;
            result += 1
        })
        .await;

    assert_eq!(result, 1u32);

    thread.join();
    Ok(())
}