fn new(npeers: usize) -> Self {
        Self {
            npeers,
            mailboxes: (0..npeers * npeers)
                .map(|_| Mutex::new(Default::default()))
                .collect(),
            receiver_counters: (0..npeers)
                .map(|_| CachePadded::new(AtomicUsize::new(0)))
                .collect(),
            receiver_callbacks: (0..npeers).map(|_| OnceCell::new()).collect(),
            sender_counters: (0..npeers)
                .map(|_| CachePadded::new(AtomicUsize::new(npeers)))
                .collect(),
            sender_callbacks: (0..npeers).map(|_| OnceCell::new()).collect(),
        }
    }
/// Create a new exchange operator for `npeers` communicating threads.
Create a new exchange operator for `npeers` communicating threads.
Create a new exchange operator for ` npeers ` communicating threads .
fn new(npeers: usize) -> Self {
        Self {
            npeers,
            mailboxes: (0..npeers * npeers)
                .map(|_| Mutex::new(Default::default()))
                .collect(),
            receiver_counters: (0..npeers)
                .map(|_| CachePadded::new(AtomicUsize::new(0)))
                .collect(),
            receiver_callbacks: (0..npeers).map(|_| OnceCell::new()).collect(),
            sender_counters: (0..npeers)
                .map(|_| CachePadded::new(AtomicUsize::new(npeers)))
                .collect(),
            sender_callbacks: (0..npeers).map(|_| OnceCell::new()).collect(),
        }
    }
fn new ( npeers : usize ) -> Self { Self { npeers , mailboxes : ( 0 .. npeers * npeers ) . map ( | _ | Mutex :: new ( Default :: default ( ) ) ) . collect ( ) , receiver_counters : ( 0 .. npeers ) . map ( | _ | CachePadded :: new ( AtomicUsize :: new ( 0 ) ) ) . collect ( ) , receiver_callbacks : ( 0 .. npeers ) . map ( | _ | OnceCell :: new ( ) ) . collect ( ) , sender_counters : ( 0 .. npeers ) . map ( | _ | CachePadded :: new ( AtomicUsize :: new ( npeers ) ) ) . collect ( ) , sender_callbacks : ( 0 .. npeers ) . map ( | _ | OnceCell :: new ( ) ) . collect ( ) , } }
Create a new exchange operator for `npeers` communicating threads.
Create a new exchange operator for ` npeers ` communicating threads .
npeers
usize