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