void waitForReady ( ) { if ( ! ready ) { writeLock ( ) ; try { while ( ! ready ) { try { cond . await ( 5000 , TimeUnit . MILLISECONDS ) ; } catch ( InterruptedException ie ) { } } } finally { writeUnlock ( ) ; } } }
Block until the object is ready to be used .