#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

#360 in Asynchronous

Download history 6457/week @ 2024-07-19 5553/week @ 2024-07-26 4601/week @ 2024-08-02 5664/week @ 2024-08-09 7189/week @ 2024-08-16 7283/week @ 2024-08-23 6282/week @ 2024-08-30 6033/week @ 2024-09-06 6407/week @ 2024-09-13 7024/week @ 2024-09-20 8736/week @ 2024-09-27 9183/week @ 2024-10-04 7876/week @ 2024-10-11 6804/week @ 2024-10-18 7479/week @ 2024-10-25 5011/week @ 2024-11-01

28,549 downloads per month
Used in 24 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–8.5MB
~72K SLoC