hooch 0.1.3

A small async runtime that's been bootlegged for my projects.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use hooch::runtime::RuntimeBuilder;

#[test]
fn test_join_handle() {
    let runtime_handle = RuntimeBuilder::default().build();

    runtime_handle.run_blocking(async {
        // We need to make sure we have a runtime on this thread
        RuntimeBuilder::default().build();
        let handle = hooch::spawner::Spawner::spawn(async { 3 });
        let value = handle.await.unwrap();

        assert!(value == 3)
    })
}