@ NullSafe public static boolean join ( Thread thread , long milliseconds , int nanoseconds ) { try { if ( thread != null ) { thread . join ( milliseconds , nanoseconds ) ; return true ; } } catch ( InterruptedException e ) { Thread . currentThread ( ) . interrupt ( ) ; } return false ; }
Causes the current Thread to join with the specified Thread . If the current Thread is interrupted while waiting for the specified Thread then the current Threads interrupt bit will be set and this method will return false . Otherwise the current Thread will wait on the specified Thread until it dies or until the time period has expired and then the method will return true .