#thread #channel #future #async

async-thread

Futures version of std::thread

3 releases

0.1.2 Dec 13, 2019
0.1.1 Dec 13, 2019
0.1.0 Dec 13, 2019

#1851 in Asynchronous

Download history 69/week @ 2024-07-20 99/week @ 2024-07-27 99/week @ 2024-08-03 131/week @ 2024-08-10 67/week @ 2024-08-17 158/week @ 2024-08-24 111/week @ 2024-08-31 208/week @ 2024-09-07 129/week @ 2024-09-14 165/week @ 2024-09-21 222/week @ 2024-09-28 116/week @ 2024-10-05 119/week @ 2024-10-12 107/week @ 2024-10-19 61/week @ 2024-10-26 57/week @ 2024-11-02

364 downloads per month
Used in 2 crates (via wineventhook)

MIT/Apache

15KB
75 lines

async-thread

This crate provides an API identical to std::thread. However, JoinHandle::join is an async fn.

let handle = crate::spawn(|| 5usize);
assert_eq!(handle.join().await.map_err(drop), Ok(5));

lib.rs:

This crate provides an API identical to std::thread. However, JoinHandle::join is an async fn.

let handle = crate::spawn(|| 5usize);
assert_eq!(handle.join().await.map_err(drop), Ok(5));

Dependencies

~87KB