#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

#444 in Asynchronous

Download history 5923/week @ 2023-12-14 3007/week @ 2023-12-21 1151/week @ 2023-12-28 2213/week @ 2024-01-04 2045/week @ 2024-01-11 2647/week @ 2024-01-18 2372/week @ 2024-01-25 4186/week @ 2024-02-01 5026/week @ 2024-02-08 3914/week @ 2024-02-15 4240/week @ 2024-02-22 4460/week @ 2024-02-29 5485/week @ 2024-03-07 5280/week @ 2024-03-14 5970/week @ 2024-03-21 5322/week @ 2024-03-28

22,988 downloads per month
Used in 20 crates (9 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