public T get() throws InterruptedException {
    if (!valueReady.await((long) (timeout * 1000), TimeUnit.MILLISECONDS)) {
      String msg = String.format("BlockingVariable.get() timed out after %1.2f seconds", timeout);
      throw new SpockTimeoutError(timeout, msg);
    }
    return value;
  }
Blocks until a value has been set for this variable, or a timeout expires.

@return the variable's value

@throws InterruptedException if the calling thread is interrupted
spock-core/src/main/java/spock/util/concurrent/BlockingVariable.java