#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

#2176 in Asynchronous

Download history 55/week @ 2024-11-16 96/week @ 2024-11-23 157/week @ 2024-11-30 191/week @ 2024-12-07 99/week @ 2024-12-14 42/week @ 2024-12-21 27/week @ 2024-12-28 57/week @ 2025-01-04 104/week @ 2025-01-11 97/week @ 2025-01-18 65/week @ 2025-01-25 97/week @ 2025-02-01 275/week @ 2025-02-08 115/week @ 2025-02-15 252/week @ 2025-02-22 79/week @ 2025-03-01

737 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