3个版本
| 0.1.2 | 2019年12月13日 |
|---|---|
| 0.1.1 | 2019年12月13日 |
| 0.1.0 | 2019年12月13日 |
在异步类别中排名第1881
每月下载量272次
在2个crate中使用了(通过wineventhook)
15KB
75 行
async-thread
这个crate提供了与std::thread相同的API。但是,JoinHandle::join是一个async fn。
let handle = crate::spawn(|| 5usize);
assert_eq!(handle.join().await.map_err(drop), Ok(5));
lib.rs:
这个crate提供了与std::thread相同的API。但是,JoinHandle::join是一个async fn。
let handle = crate::spawn(|| 5usize);
assert_eq!(handle.join().await.map_err(drop), Ok(5));
依赖
~86KB