pub fn new(size: usize) -> Latches {
        let size = usize::next_power_of_two(size);
        let mut slots = Vec::with_capacity(size);
        (0..size).for_each(|_| slots.push(Mutex::new(Latch::new()).into()));
        Latches { slots, size }
    }
/// Creates latches.
///
/// The size will be rounded up to the power of 2.
Creates latches.
The size will be rounded up to the power of 2.
Creates latches . The size will be rounded up to the power of 2 .
pub fn new(size: usize) -> Latches {
        let size = usize::next_power_of_two(size);
        let mut slots = Vec::with_capacity(size);
        (0..size).for_each(|_| slots.push(Mutex::new(Latch::new()).into()));
        Latches { slots, size }
    }
pub fn new ( size : usize ) -> Latches { let size = usize :: next_power_of_two ( size ) ; let mut slots = Vec :: with_capacity ( size ) ; ( 0 .. size ) . for_each ( | _ | slots . push ( Mutex :: new ( Latch :: new ( ) ) . into ( ) ) ) ; Latches { slots , size } }
Creates latches.
Creates latches .
size
usize