pub fn join(self, timeout: Duration) -> Result<T, ThreadJoinError<T>> {
        if let Err(RecvTimeoutError::Timeout) = self.signal.recv_timeout(timeout) {
            return Err(ThreadJoinError::Timeout(self));
        }
        self.handle.join().map_err(|e| {
            if let Some(e) = e.downcast_ref::<&'static str>() {
                ThreadJoinError::Panic(e)
            } else {
                ThreadJoinError::Unknown(e)
            }
        })
    }
/// if thread join wait timeout, return handle self, otherwise return thread join result.
if thread join wait timeout, return handle self, otherwise return thread join result.
if thread join wait timeout return handle self otherwise return thread join result .
pub fn join(self, timeout: Duration) -> Result<T, ThreadJoinError<T>> {
        if let Err(RecvTimeoutError::Timeout) = self.signal.recv_timeout(timeout) {
            return Err(ThreadJoinError::Timeout(self));
        }
        self.handle.join().map_err(|e| {
            if let Some(e) = e.downcast_ref::<&'static str>() {
                ThreadJoinError::Panic(e)
            } else {
                ThreadJoinError::Unknown(e)
            }
        })
    }
pub fn join ( self , timeout : Duration ) -> Result < T , ThreadJoinError < T > > { if let Err ( RecvTimeoutError :: Timeout ) = self . signal . recv_timeout ( timeout ) { return Err ( ThreadJoinError :: Timeout ( self ) ) ; } self . handle . join ( ) . map_err ( | e | { if let Some ( e ) = e . downcast_ref :: < & ' static str > ( ) { ThreadJoinError :: Panic ( e ) } else { ThreadJoinError :: Unknown ( e ) } } ) }
if thread join wait timeout, return handle self, otherwise return thread join result.
if thread join wait timeout return handle self otherwise return thread join result .
self
timeout
Duration
self
timeout
Duration