3 releases
0.1.2 | Dec 13, 2019 |
---|---|
0.1.1 | Dec 13, 2019 |
0.1.0 | Dec 13, 2019 |
#1881 in Asynchronous
272 downloads per month
Used in 2 crates
(via wineventhook)
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