Is it possible to perform iteration using Rayon inside a map closure that is already part of a Rayon parallel iteration or will this result in potential deadlock as the task may be put on the Rayon work queue but never gotten to because the task that is waiting for it never finishes while waiting?
In other words, is it OK to do this? As follows:
let vec1 = vec![ .... ]; let vec2 = vec![ .... ]; vec1.par_iter().map(|v1| v2.par_iter().map(|v2|some_computation(v1,v2)).first());
The above is an incredibly simplified version of what I'm doing, but, the compiler seems to be allowing it. I can't help but feel that it is a possible dead-lock though.