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

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

#487 in Asynchronous

Download history 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 11300/week @ 2025-01-18 10834/week @ 2025-01-25 11090/week @ 2025-02-01 11005/week @ 2025-02-08 11882/week @ 2025-02-15 13612/week @ 2025-02-22 13904/week @ 2025-03-01 16547/week @ 2025-03-08 12954/week @ 2025-03-15

59,380 downloads per month
Used in 33 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