crossbeam-rs / crossbeam

Tools for concurrent programming in Rust
Apache License 2.0
7.35k stars 464 forks source link

Can crossbeam::queue support rayon? #494

Open zhengyi-yang opened 4 years ago

zhengyi-yang commented 4 years ago

Is it possible to implement rayon's par_iter and into_par_iter for crossbeam::queue?

ghost commented 4 years ago

I think we could do that, but perhaps it'd be better to add .iter() to queues (similar to channels), and then you could convert the iterator into a parallel one by doing .par_iter() or .into_par_iter() (I forget which one).