// Each child in turn will receive a message.
Each child in turn will receive a message.
Each child in turn will receive a message .
fn broadcast_message(&self, entries: &DispatcherMap, message: &Arc<SignedMessage>) {
        let entries = entries
            .iter()
            .filter(|entry| entry.0.is_public())
            .collect::<Vec<_>>();
        if entries.is_empty() {
            debug!("no public children to broadcast message to");
            return;
        }
        let current_index = self.index.load(Ordering::SeqCst) % entries.len();
        if let Some(entry) = entries.get(current_index) {
            warn!(
                "sending message to child {}/{} - {}",
                current_index + 1,
                entries.len(),
                entry.0.path()
            );
            entry.0.tell_anonymously(message.clone()).unwrap();
            self.index.store(current_index + 1, Ordering::SeqCst);
        };
    }
fn broadcast_message ( & self , entries : & DispatcherMap , message : & Arc < SignedMessage > ) { let entries = entries . iter ( ) . filter ( | entry | entry . 0 . is_public ( ) ) . collect :: < Vec < _ > > ( ) ; if entries . is_empty ( ) { debug ! ( " " ) ; return ; } let current_index = self . index . load ( Ordering :: SeqCst ) % entries . len ( ) ; if let Some ( entry ) = entries . get ( current_index ) { warn ! ( " " current_index 1 entries len ( ) entry 0 path ( ) ) ; entry . 0 . tell_anonymously ( message . clone ( ) ) . unwrap ( ) ; self . index . store ( current_index + 1 , Ordering :: SeqCst ) ; } ; }
Each child in turn will receive a message.
Each child in turn will receive a message .
&self
entries
&DispatcherMap
message
&Arc<SignedMessage>