No, in fact, as far as I’m aware, the
std
implementation should be
better
(more lightweight) since it can use some internals of how
std::thread
works. Also, it managed to come with a (usable) API where you don’t have to pass the scope into spawned threads via closure arguments, i.e.
s.spawn(|s| /* use `s` here, too */)
(crossbeam) vs
s.spawn(|| /* use `s` here, too */)
(std); and in particular
s.spawn(|_| /* I don't even need `s` here */)
(crossbeam) vs
s.spawn(|| /* I don't even need `s` here */)
(std)
FWIW, I've had a much better
experience
with
rayon::scope
(and more generally
rayon::ThreadPool::scope
) than with either
crossbeam
directly or the "new"
std::thread::scope
.
It's a larger dependency for sure.