From 68765467d8d168c959ac39ba7cc37df7cee3678e Mon Sep 17 00:00:00 2001 From: Matilda Smeds Date: Wed, 11 Oct 2023 22:38:57 +0200 Subject: [PATCH] Tutorial: Add link to rayon example (#722) --- content/tokio/tutorial/index.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/content/tokio/tutorial/index.md b/content/tokio/tutorial/index.md index b27de436..36898235 100644 --- a/content/tokio/tutorial/index.md +++ b/content/tokio/tutorial/index.md @@ -91,7 +91,7 @@ simultaneously, there are also some use-cases where Tokio is not a good fit. task spends most of its time waiting for IO. If the only thing your application does is run computations in parallel, you should be using [rayon]. That said, it is still possible to "mix & match" - if you need to do both. + if you need to do both. See [this blog post for a practical example][rayon-example]. - Reading a lot of files. Although it seems like Tokio would be useful for projects that simply need to read a lot of files, Tokio provides no advantage here compared to an ordinary threadpool. This is because operating systems @@ -106,6 +106,7 @@ simultaneously, there are also some use-cases where Tokio is not a good fit. bridging with sync code][bridging]. [rayon]: https://docs.rs/rayon/ +[rayon-example]: https://ryhl.io/blog/async-what-is-blocking/#the-rayon-crate [reqwest]: https://docs.rs/reqwest/ [bridging]: /tokio/topics/bridging