Crates.io | tokio-rayon |
lib.rs | tokio-rayon |
version | 2.1.0 |
source | src |
created_at | 2021-04-02 06:43:35.891915 |
updated_at | 2021-04-05 06:37:32.540716 |
description | Mix async code with CPU-heavy thread pools using Tokio + Rayon |
homepage | |
repository | https://github.com/andybarron/tokio-rayon |
max_upload_size | |
id | 377354 |
size | 20,165 |
Mix async code with CPU-heavy thread pools using Tokio + Rayon
Sometimes, you're doing async stuff, and you also need to do CPU-heavy stuff. This library will help!
let nft = tokio_rayon::spawn_async(|| {
do_some_crypto_stuff()
}).await?;
assert_eq!(nft, ExpensiveNft);