#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

#1881 in Asynchronous

Download history 121/week @ 2024-04-01 126/week @ 2024-04-08 102/week @ 2024-04-15 158/week @ 2024-04-22 120/week @ 2024-04-29 344/week @ 2024-05-06 224/week @ 2024-05-13 219/week @ 2024-05-20 81/week @ 2024-05-27 156/week @ 2024-06-03 191/week @ 2024-06-10 175/week @ 2024-06-17 62/week @ 2024-06-24 61/week @ 2024-07-01 80/week @ 2024-07-08 62/week @ 2024-07-15

272 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

~86KB