pub fn send_finished_once(id: &UnitName,
                              ctrl: &Sender<ManagerControlMessage>,
                              result_val: i32,
                              result_arc: &Arc<Mutex<Option<i32>>>,
                              last_line: &Arc<Mutex<String>>) {

        let mut result = result_arc.lock().unwrap();

        if result.is_none() {
            ctrl.send(ManagerControlMessage::new(&id, ManagerControlMessageContents::TestFinished(result_val, last_line.lock().unwrap().clone()))).ok();
            *result = Some(result_val);
        }
    }
/// Send the "test finished" message and update the local result value.
/// This ensures that we only send the "Finished" result once.

Send the "test finished" message and update the local result value.
This ensures that we only send the "Finished" result once.
Send the " test finished " message and update the local result value . This ensures that we only send the " Finished " result once .
pub fn send_finished_once(id: &UnitName,
                              ctrl: &Sender<ManagerControlMessage>,
                              result_val: i32,
                              result_arc: &Arc<Mutex<Option<i32>>>,
                              last_line: &Arc<Mutex<String>>) {
        let mut result = result_arc.lock().unwrap();
        if result.is_none() {
            ctrl.send(ManagerControlMessage::new(&id, ManagerControlMessageContents::TestFinished(result_val, last_line.lock().unwrap().clone()))).ok();
            *result = Some(result_val);
        }
    }
pub fn send_finished_once ( id : & UnitName , ctrl : & Sender < ManagerControlMessage > , result_val : i32 , result_arc : & Arc < Mutex < Option < i32 > > > , last_line : & Arc < Mutex < String > > ) { let mut result = result_arc . lock ( ) . unwrap ( ) ; if result . is_none ( ) { ctrl . send ( ManagerControlMessage :: new ( & id , ManagerControlMessageContents :: TestFinished ( result_val , last_line . lock ( ) . unwrap ( ) . clone ( ) ) ) ) . ok ( ) ; * result = Some ( result_val ) ; } }
Send the "test finished" message and update the local result value.
Send the " test finished " message and update the local result value .
id
&UnitName
ctrl
&Sender<ManagerControlMessage>
result_val
i32
result_arc
&Arc<Mutex<Option<i32>>>
last_line
&Arc<Mutex<String>>
id
&UnitName
ctrl
&Sender<ManagerControlMessage>
result_val
i32
result_arc
&Arc<Mutex<Option<i32>>>
last_line
&Arc<Mutex<String>>