question: private boolean await0 ( long timeoutMillis , boolean interruptable ) throws InterruptedException { long endTime = System . currentTimeMillis ( ) + timeoutMillis ; if ( endTime < 0 ) { endTime = Long . MAX_VALUE ; } synchronized ( lock ) { if ( ready ) { return ready ; } else if ( timeoutMillis <= 0 ) { return ready ; } waiters ++ ; try { for ( ; ; ) { try { long timeOut = Math . min ( timeoutMillis , DEAD_LOCK_CHECK_INTERVAL ) ; lock . wait ( timeOut ) ; } catch ( InterruptedException e ) { if ( interruptable ) { throw e ; } } if ( ready ) { return true ; } if ( endTime < System . currentTimeMillis ( ) ) { return ready ; } } } finally { waiters -- ; if ( ! ready ) { checkDeadLock ( ) ; } } } }
target:  Wait for the Future to be ready. If the requested delay is 0 or negative, this method immediately returns the value of the 'ready' flag. Every 5 second, the wait will be suspended to be able to check if there is a deadlock or not.