I have only used the std::thread
package from the standard library, but there seems to be many different related implementation of threads
There is crossbeam.
Threadpools
Scoped threadpool
SimpleParallel
There seems to be too little explanations on each README of each project too.
If you have used any of these projects, can you please give an appropriate usage of these.
Hi ivanceras,
I've used some of these in my mandelbrot test:
mandel-rust
The idea is to show how to use these different crates. In the future I want to add more (Rayon, ArrayFire, ...).
Hope this helps, if you have more questions post them here!
There is also this one: GitHub - nikomatsakis/rayon: Rayon: A data parallelism library for Rust
From @nikomatsakis. What is nice about it is that it implements potential parallelism
(a la C++11 std::async).
1 Like
Rayon has good documentation. I wish other libraries writes out even just an overview of the library.
By the way, on the topic of Rayon, I haven't had as much time to work on it as I would like, but I finally got around to putting in a bit more effort this morning. In particular there are two pending PRs (#23 and #24) that significantly expand the par-iter API and clean it up.
1 Like
My summary of when rayon is a good choice is: when you have a for loop (or recursive fn) that takes too long. In particular, it is ill-suited to asynchronous execution, for which you would want a more future-like interface (but which would also prevent you from using data on the stack, or at least require something like crossbeam's scoped threads; simple-parallel offers some nice features for those cases).
Also, you may be interested in the video from this recent bay area Rust meetup, where @aturon, @huon and I talked about crossbeam, simple-parallel, and rayon respectively:
https://air.mozilla.org/bay-area-rust-meetup-january-2016/
2 Likes