pub fn exit(&self, retcode: i64) {
        let mut inner = self.inner.lock();
        if let Status::Exited(_) = inner.status {
            return;
        }
        inner.status = Status::Exited(retcode);
        if inner.threads.is_empty() {
            inner.handles.clear();
            drop(inner);
            self.terminate();
            return;
        }
        for thread in inner.threads.iter() {
            thread.kill();
        }
        inner.handles.clear();
    }
/// Exit current process with `retcode`.
/// The process do not terminate immediately when exited.
/// It will terminate after all its child threads are terminated.
Exit current process with `retcode`.
The process do not terminate immediately when exited.
It will terminate after all its child threads are terminated.
Exit current process with ` retcode ` . The process do not terminate immediately when exited . It will terminate after all its child threads are terminated .
pub fn exit(&self, retcode: i64) {
        let mut inner = self.inner.lock();
        if let Status::Exited(_) = inner.status {
            return;
        }
        inner.status = Status::Exited(retcode);
        if inner.threads.is_empty() {
            inner.handles.clear();
            drop(inner);
            self.terminate();
            return;
        }
        for thread in inner.threads.iter() {
            thread.kill();
        }
        inner.handles.clear();
    }
pub fn exit ( & self , retcode : i64 ) { let mut inner = self . inner . lock ( ) ; if let Status :: Exited ( _ ) = inner . status { return ; } inner . status = Status :: Exited ( retcode ) ; if inner . threads . is_empty ( ) { inner . handles . clear ( ) ; drop ( inner ) ; self . terminate ( ) ; return ; } for thread in inner . threads . iter ( ) { thread . kill ( ) ; } inner . handles . clear ( ) ; }
Exit current process with `retcode`.
Exit current process with ` retcode ` .
&self
retcode
i64
&self
retcode
i64