public void await ( long timeoutMillis ) throws InterruptedException , TimeoutException { if ( released . get ( ) ) { return ; } if ( ! impl . tryAcquire ( timeoutMillis , TimeUnit . MILLISECONDS ) ) { throw new TimeoutException ( "Timeout expired prior to latch becoming available." ) ; } }
Block until another thread calls release or the thread is interrupted .