fn send_result_if_not_already_done(&mut self, handle: Option<Handle>) {
        if let Some(port) = self.send_port.take() {
            let res = if let Some(handle) = handle {
                CObject::typed_data(TypedData::Int64(vec![MAGIC_TAG, self.completer_id, handle]))
            } else {
                CObject::array(vec![
                    Box::new(CObject::int64(MAGIC_TAG)),
                    Box::new(CObject::int64(self.completer_id)),
                    Box::new(CObject::string_lossy("future canceled in rust")),
                ])
            };
            if let Err(_err) = port.post_cobject(res) {
                //TODO report to error control port
                //IF we do so output result and handle
                //it in spawn?
            }
        }
    }
/// Sends the result
///
/// Does nothing if the result was already sent.
Sends the result
Does nothing if the result was already sent.
Sends the result Does nothing if the result was already sent .
fn send_result_if_not_already_done(&mut self, handle: Option<Handle>) {
        if let Some(port) = self.send_port.take() {
            let res = if let Some(handle) = handle {
                CObject::typed_data(TypedData::Int64(vec![MAGIC_TAG, self.completer_id, handle]))
            } else {
                CObject::array(vec![
                    Box::new(CObject::int64(MAGIC_TAG)),
                    Box::new(CObject::int64(self.completer_id)),
                    Box::new(CObject::string_lossy("future canceled in rust")),
                ])
            };
            if let Err(_err) = port.post_cobject(res) {
                //TODO report to error control port
                //IF we do so output result and handle
                //it in spawn?
            }
        }
    }
fn send_result_if_not_already_done ( & mut self , handle : Option < Handle > ) { if let Some ( port ) = self . send_port . take ( ) { let res = if let Some ( handle ) = handle { CObject :: typed_data ( TypedData :: Int64 ( vec ! [ MAGIC_TAG self completer_id handle ] ) ) } else { CObject :: array ( vec ! [ Box new ( CObject int64 ( MAGIC_TAG ) ) Box new ( CObject int64 ( self completer_id ) ) Box new ( CObject string_lossy ( " " ) ) ] ) } ; if let Err ( _err ) = port . post_cobject ( res ) { //TODO report to error control port //IF we do so output result and handle //it in spawn? } } }
Sends the result
Does nothing if the result was already sent.
Sends the result Does nothing if the result was already sent .
&mut self
handle
Option<Handle>