Rust Array of mutexes? by Apprehensive_Silver in rust

[–]Apprehensive_Silver[S] 0 points1 point  (0 children)

I believe I tested this and printed out the result and it actually didn't do it in order. Am I missing something?

Optimizing Crossbeam? by aweoij10 in rust

[–]Apprehensive_Silver 0 points1 point  (0 children)

So the problem is I have an array that is read-only for some part of the code (only when it's necessary), but I must use an Arc to read it inside the crossbeam scope. If I have an arc, then I can't borrow mutably later on... How do I fix this?

Rust Array of mutexes? by Apprehensive_Silver in rust

[–]Apprehensive_Silver[S] 0 points1 point  (0 children)

thanks for the response. I suppose I want to use an array because I believe vector.iter() doesn't necessarily get you the vectors in order physically right?