pub fn try_remove(&self, tid: Tid) -> Option<ExitCode> {
        let mut proc_lock = self.threads[tid].lock();
        let proc = proc_lock.as_ref().expect("thread not exist");
        match proc.status {
            Status::Exited(code) => {
                // release the tid
                *proc_lock = None;
                Some(code)
            },
            _ => None,
        }
    }
/// Try to remove an exited thread `tid`.
/// Return its exit code if success.
Try to remove an exited thread `tid`.
Return its exit code if success.
Try to remove an exited thread ` tid ` . Return its exit code if success .
pub fn try_remove(&self, tid: Tid) -> Option<ExitCode> {
        let mut proc_lock = self.threads[tid].lock();
        let proc = proc_lock.as_ref().expect("thread not exist");
        match proc.status {
            Status::Exited(code) => {
                // release the tid
                *proc_lock = None;
                Some(code)
            },
            _ => None,
        }
    }
pub fn try_remove ( & self , tid : Tid ) -> Option < ExitCode > { let mut proc_lock = self . threads [ tid ] . lock ( ) ; let proc = proc_lock . as_ref ( ) . expect ( " " ) ; match proc . status { Status :: Exited ( code ) => { // release the tid * proc_lock = None ; Some ( code ) } , _ => None , } }
Try to remove an exited thread `tid`.
Try to remove an exited thread ` tid ` .
&self
tid
Tid
&self
tid
Tid