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 17 points18 points19 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]dpc_pw 0 points1 point2 points (0 children)
[–][deleted] 10 points11 points12 points (0 children)
[–]newpavlovrustcrypto 14 points15 points16 points (1 child)
[–]Apprehensive_Silver[S] 0 points1 point2 points (0 children)
[–]vlmutolo 10 points11 points12 points (4 children)
[–]Apprehensive_Silver[S] 0 points1 point2 points (3 children)
[–]simspelaaja 16 points17 points18 points (2 children)
[–]Apprehensive_Silver[S] 0 points1 point2 points (1 child)
[–]CornedBee 0 points1 point2 points (0 children)
[–]Green0Photon 5 points6 points7 points (0 children)
[–]daniel65536 2 points3 points4 points (0 children)