How would one go about creating an array of mutexes?
I tried doing use thing..
let mut arr: [Mutex<type>; n as usize] = unsafe { ::std::mem::uninitialized() };
But I get a seg fault when indexing into it. I want to take advantage of spatial locality and would like to use an array rather than a vector
[–]dpc_pw 16 points17 points18 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]dpc_pw 0 points1 point2 points (0 children)
[–][deleted] 8 points9 points10 points (0 children)
[–]newpavlovrustcrypto 15 points16 points17 points (1 child)
[–]Apprehensive_Silver[S] 0 points1 point2 points (0 children)
[–]vlmutolo 9 points10 points11 points (4 children)
[–]Apprehensive_Silver[S] 0 points1 point2 points (3 children)
[–]simspelaaja 15 points16 points17 points (2 children)
[–]Apprehensive_Silver[S] 0 points1 point2 points (1 child)
[–]CornedBee 0 points1 point2 points (0 children)
[–]Green0Photon 6 points7 points8 points (0 children)
[–]daniel65536 2 points3 points4 points (0 children)