#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

#373 in Asynchronous

Download history 4749/week @ 2024-08-06 6570/week @ 2024-08-13 6978/week @ 2024-08-20 7210/week @ 2024-08-27 6457/week @ 2024-09-03 5782/week @ 2024-09-10 6499/week @ 2024-09-17 7729/week @ 2024-09-24 10012/week @ 2024-10-01 7988/week @ 2024-10-08 6983/week @ 2024-10-15 6862/week @ 2024-10-22 6933/week @ 2024-10-29 4969/week @ 2024-11-05 5633/week @ 2024-11-12 4848/week @ 2024-11-19

23,697 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–9MB
~72K SLoC