#futures #thread #channel #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

#958 in Asynchronous

Download history 494/week @ 2023-02-04 482/week @ 2023-02-11 830/week @ 2023-02-18 402/week @ 2023-02-25 598/week @ 2023-03-04 457/week @ 2023-03-11 385/week @ 2023-03-18 431/week @ 2023-03-25 195/week @ 2023-04-01 185/week @ 2023-04-08 324/week @ 2023-04-15 246/week @ 2023-04-22 163/week @ 2023-04-29 395/week @ 2023-05-06 342/week @ 2023-05-13 333/week @ 2023-05-20

1,271 downloads per month
Used in 2 crates (via wineventhook)

MIT/Apache

14KB
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

~90KB