/// Receive a new status message from any of the channels, if available
Receive a new status message from any of the channels, if available
Receive a new status message from any of the channels if available
fn pull_control(&self) -> Option<ControlMessage> {
        let (tx, rx) = channel();
        self.transaction(&move |data| {
            for id in ControlMsgChannel::enum_iter() {
                if let Some(v) = data.get_channel_mut(id.into()).pop() {
                    tx.send(Some(ControlMessage::from_raw(id, v).unwrap()))
                        .unwrap();
                    break;
                }
            }
            tx.send(None).unwrap();
        });
        rx.recv().unwrap()
    }
fn pull_control ( & self ) -> Option < ControlMessage > { let ( tx , rx ) = channel ( ) ; self . transaction ( & move | data | { for id in ControlMsgChannel :: enum_iter ( ) { if let Some ( v ) = data . get_channel_mut ( id . into ( ) ) . pop ( ) { tx . send ( Some ( ControlMessage :: from_raw ( id , v ) . unwrap ( ) ) ) . unwrap ( ) ; break ; } } tx . send ( None ) . unwrap ( ) ; } ) ; rx . recv ( ) . unwrap ( ) }
Receive a new status message from any of the channels, if available
Receive a new status message from any of the channels if available
&self