#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

#1911 in Asynchronous

Download history 120/week @ 2024-08-23 142/week @ 2024-08-30 181/week @ 2024-09-06 150/week @ 2024-09-13 172/week @ 2024-09-20 183/week @ 2024-09-27 146/week @ 2024-10-04 127/week @ 2024-10-11 111/week @ 2024-10-18 61/week @ 2024-10-25 62/week @ 2024-11-01 54/week @ 2024-11-08 54/week @ 2024-11-15 93/week @ 2024-11-22 100/week @ 2024-11-29 241/week @ 2024-12-06

493 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