Closed polyfractal closed 8 years ago
I haven't read your code in detail, but it should be possible to support mutable references, I just didn't spend any time on extending the par_iter
API in a while. I am trying to carve out some time in the next few weeks.
So I was attempting to use
into_par_iter()
on something that needed mutability, and ran into what seems like a limitation.My setup is a cellular automata grid. A single Grid holds a vector of Pages, and each Page holds a vector of Cells. The goal was to
into_par_iter()
over the pages, since they can be processed independently. However, thegrow()
method on each Page requires mutability because they modify their state internally...which seems to be a problem.A rough outline:
Would it be possible for Rayon to support this, or is there something subtle I'm missing? Thanks!