[−][src]Crate 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));
Structs
Builder | Thread factory, which can be used in order to configure the properties of a new thread. |
JoinHandle | An owned permission to join on a thread (block on its termination). |
Functions
spawn | Spawns a new thread, returning a |