I wrote a #Rust script that is, as expected, taking some time and CPU resources. However I see that it's only using one of my 8 cores(?) (see screenshot).
If I were to use threads in Rust could I use more than one CPU? https://octodon.social/media/YxBLdEj5e0Qg6PcNu5U
@schlink https://doc.rust-lang.org/book/second-edition/ch16-01-threads.html
I do believe you have to make the program parallel by yourself, though there are probably wrappers over these lower-level constructs.
@mathuin right, yeah, for sure I knew I'd need to implement something code-wise. Just wanted to make sure Rust threads would be able to use more than one of my cores.
and re-wrapper, @carey sent me link to : https://github.com/rayon-rs/rayon
Haven't tried it yet though, but it looks really lightweight
@schlink @carey My initial thought is that there would be no issue, but I've yet to do enough rust to be sure.