#thread-pool #async-io #rayon #tokio #async

tokio-rayon

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

4 releases (stable)

2.1.0 Apr 5, 2021
2.0.0 Apr 4, 2021
1.0.0 Apr 2, 2021
0.1.0 Apr 2, 2021

#442 in Asynchronous

Download history 2018/week @ 2024-01-12 2636/week @ 2024-01-19 2630/week @ 2024-01-26 4310/week @ 2024-02-02 5061/week @ 2024-02-09 3905/week @ 2024-02-16 4203/week @ 2024-02-23 4771/week @ 2024-03-01 5491/week @ 2024-03-08 5540/week @ 2024-03-15 6078/week @ 2024-03-22 6857/week @ 2024-03-29 7690/week @ 2024-04-05 3840/week @ 2024-04-12 3838/week @ 2024-04-19 3664/week @ 2024-04-26

20,418 downloads per month
Used in 20 crates (8 directly)

MIT license

15KB
250 lines

tokio-rayon

Mix async code with CPU-heavy thread pools using Tokio + 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 = tokio_rayon::spawn_async(|| {
  do_some_crypto_stuff()
}).await?;

assert_eq!(nft, ExpensiveNft);

Dependencies

~3–4.5MB
~72K SLoC