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

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

#422 in Asynchronous

Download history 9241/week @ 2024-10-05 7382/week @ 2024-10-12 7002/week @ 2024-10-19 7427/week @ 2024-10-26 4692/week @ 2024-11-02 5788/week @ 2024-11-09 5552/week @ 2024-11-16 7464/week @ 2024-11-23 8317/week @ 2024-11-30 7160/week @ 2024-12-07 7955/week @ 2024-12-14 3676/week @ 2024-12-21 4987/week @ 2024-12-28 10295/week @ 2025-01-04 35156/week @ 2025-01-11 9268/week @ 2025-01-18

60,335 downloads per month
Used in 30 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–9MB
~72K SLoC