#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

#1685 in Asynchronous

Download history 65/week @ 2023-12-08 34/week @ 2023-12-15 15/week @ 2023-12-22 10/week @ 2023-12-29 81/week @ 2024-01-05 150/week @ 2024-01-12 28/week @ 2024-01-19 56/week @ 2024-01-26 114/week @ 2024-02-02 89/week @ 2024-02-09 136/week @ 2024-02-16 96/week @ 2024-02-23 267/week @ 2024-03-01 129/week @ 2024-03-08 74/week @ 2024-03-15 69/week @ 2024-03-22

551 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