/// Get a copy of the messsage on recieving a message
Get a copy of the messsage on recieving a message
Get a copy of the messsage on recieving a message
pub fn receive(&'static self, cxt: &Context) -> Option<T> {
        critical_section(|_| match self.semaphore.unsafe_test_and_reset(cxt) {
            Ok(res) if res == true => {
                #[cfg(feature = "system_logger")]
                {
                    if logging::get_message_recieve() {
                        logging::report(LogEventType::MessageRecieve(get_curr_tid() as u32));
                    }
                }
                let x = self.value.borrow().clone();
                return Some(x);
            }
            _ => return None,
        })
    }
pub fn receive ( & ' static self , cxt : & Context ) -> Option < T > { critical_section ( | _ | match self . semaphore . unsafe_test_and_reset ( cxt ) { Ok ( res ) if res == true => { # [ cfg ( feature " " ) ] { if logging :: get_message_recieve ( ) { logging :: report ( LogEventType :: MessageRecieve ( get_curr_tid ( ) as u32 ) ) ; } } let x = self . value . borrow ( ) . clone ( ) ; return Some ( x ) ; } _ => return None , } ) }
Get a copy of the messsage on recieving a message
Get a copy of the messsage on recieving a message
&'static self
cxt
&Context