| Crates.io | async-thread |
| lib.rs | async-thread |
| version | 0.1.2 |
| created_at | 2019-12-13 17:03:23.170411+00 |
| updated_at | 2019-12-13 17:46:10.919032+00 |
| description | Futures version of std::thread |
| homepage | https://github.com/leo60228/async-thread |
| repository | https://github.com/leo60228/async-thread |
| max_upload_size | |
| id | 189090 |
| size | 14,470 |
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));