#thread-pool #rayon #future #async

async-rayon

Mix async code with CPU-heavy thread pools using Futures + Rayon

1 unstable release

0.1.0 Jul 4, 2024

#966 in Asynchronous

33 downloads per month

MIT license

15KB
250 lines

async-rayon

Mix async code with CPU-heavy thread pools using Futures + Rayon

Documentation Build status Test coverage
crates.io Downloads Rust version
MIT license

Resources

TL;DR

Sometimes, you're doing async stuff, and you also need to do CPU-heavy stuff. This library will help!

let nft = async_rayon::spawn_async(|| {
  do_some_crypto_stuff()
}).await?;

assert_eq!(nft, ExpensiveNft);

Dependencies

~2MB
~41K SLoC