fn dispatch(self) {
        drop(self.state.sender);
        if self.forward_to_sender {
            for ev in self.receiver {
                let mut senders = self.state.senders.lock().unwrap();
                senders.retain(|(_idx, sender)| sender.send(ev.clone()).is_ok());
            }
        } else {
            for ev in self.receiver {
                let mut senders = self.state.senders.lock().unwrap();
                senders.retain(|(idx, sender)| {
                    if *idx != ev.sender_id {
                        sender.send(ev.clone()).is_ok()
                    } else {
                        true
                    }
                });
            }
        }
    }
/// Dispatching loop
/// As soon as we don't have any senders it will exit
Dispatching loop
As soon as we don't have any senders it will exit
Dispatching loop As soon as we don ' t have any senders it will exit
fn dispatch(self) {
        drop(self.state.sender);
        if self.forward_to_sender {
            for ev in self.receiver {
                let mut senders = self.state.senders.lock().unwrap();
                senders.retain(|(_idx, sender)| sender.send(ev.clone()).is_ok());
            }
        } else {
            for ev in self.receiver {
                let mut senders = self.state.senders.lock().unwrap();
                senders.retain(|(idx, sender)| {
                    if *idx != ev.sender_id {
                        sender.send(ev.clone()).is_ok()
                    } else {
                        true
                    }
                });
            }
        }
    }
fn dispatch ( self ) { drop ( self . state . sender ) ; if self . forward_to_sender { for ev in self . receiver { let mut senders = self . state . senders . lock ( ) . unwrap ( ) ; senders . retain ( | ( _idx , sender ) | sender . send ( ev . clone ( ) ) . is_ok ( ) ) ; } } else { for ev in self . receiver { let mut senders = self . state . senders . lock ( ) . unwrap ( ) ; senders . retain ( | ( idx , sender ) | { if * idx != ev . sender_id { sender . send ( ev . clone ( ) ) . is_ok ( ) } else { true } } ) ; } } }
Dispatching loop
As soon as we don't have any senders it will exit
Dispatching loop As soon as we don ' t have any senders it will exit
self
self