pub fn join(self) -> Result<T, ()> {
        loop {
            trace!("try to join thread {}", self.thread.tid);
            if let Some(exit_code) = processor().manager().try_remove(self.thread.tid) {
                // Find return value on the heap from the exit code.
                return Ok(unsafe { *Box::from_raw(exit_code as *mut T) });
            }
            processor().manager().wait(current().id(), self.thread.tid);
            processor().yield_now();
        }
    }
/// Waits for the associated thread to finish.
Waits for the associated thread to finish.
Waits for the associated thread to finish .
pub fn join(self) -> Result<T, ()> {
        loop {
            trace!("try to join thread {}", self.thread.tid);
            if let Some(exit_code) = processor().manager().try_remove(self.thread.tid) {
                // Find return value on the heap from the exit code.
                return Ok(unsafe { *Box::from_raw(exit_code as *mut T) });
            }
            processor().manager().wait(current().id(), self.thread.tid);
            processor().yield_now();
        }
    }
pub fn join ( self ) -> Result < T , ( ) > { loop { trace ! ( " " self thread tid ) ; if let Some ( exit_code ) = processor ( ) . manager ( ) . try_remove ( self . thread . tid ) { // Find return value on the heap from the exit code. return Ok ( unsafe { * Box :: from_raw ( exit_code as * mut T ) } ) ; } processor ( ) . manager ( ) . wait ( current ( ) . id ( ) , self . thread . tid ) ; processor ( ) . yield_now ( ) ; } }
Waits for the associated thread to finish.
Waits for the associated thread to finish .
self
self