#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

#1790 in Asynchronous

Download history 31/week @ 2024-01-02 133/week @ 2024-01-09 88/week @ 2024-01-16 39/week @ 2024-01-23 63/week @ 2024-01-30 120/week @ 2024-02-06 92/week @ 2024-02-13 135/week @ 2024-02-20 117/week @ 2024-02-27 279/week @ 2024-03-05 94/week @ 2024-03-12 73/week @ 2024-03-19 104/week @ 2024-03-26 112/week @ 2024-04-02 126/week @ 2024-04-09 94/week @ 2024-04-16

455 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