Scoped threads: std or crossbeam

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)

1 Like