Will start the wait for the condition to become true.
324510
@Override
    public Message call() throws InterruptedException {
        AbstractExpectation.LOGGER.info("Thread blocked waiting for message to pass condition {}.",
                this.getBlockingCondition());
        try {
            this.latch.await();
            this.manager.unsetExpectation(this);
            AbstractExpectation.LOGGER.info("Condition passed.");
            if (this.actionFuture != null) {
                this.waitUntilActionComplete();
            }
            AbstractExpectation.LOGGER.info("Expectation processing passed.");
            return this.stash;
        } finally {
            this.manager.unsetExpectation(this); // in case await() throws
            this.actionFuture = null;
            AbstractExpectation.LOGGER.info("Thread unblocked.");
        }
    }
901878
def wait(state)
      if !LXC::Shell.valid_state?(status.state)
        raise ArgumentError, "Invalid container state: #{state}"
      end

      run("wait", "-s", state)
    end
897445
def waitStarted(self):
        """"""
        started = False
        while not started:
            if self.starter != None:
                started = self.starter.waitUntilStarted(0.5)
1225852
function waitFor(name, condition) {
  var time = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 100;
  var maxCount = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1000;

  if (isFunction(name)) {
    maxCount = time;
    time = isNumeric(condition) ? condition : 100;
    condition = name;
    name = null;
  }

  if (!store.waitFor) store.waitFor = {};
  var waits = store.waitFor;

  if (name && isset(waits[name])) {
    glb().clearInterval(waits[name]);
    delete waits[name];
  }

  return new Promise(function (resolve, reject) {
    var count = 0;

    function judge(interval) {
      if (count <= maxCount) {
        if (condition()) {
          stop(interval, name);
          resolve();
        }
      } else {
        stop(interval, name);
        reject(new Error('waitFor: Limit is reached'));
      }

      count++;
    }

    function stop(interval, name) {
      if (interval) {
        if (name && isset(waits[name])) {
          glb().clearInterval(waits[name]);
          delete waits[name];
        } else {
          glb().clearInterval(interval);
        }
      }
    }

    var interval = glb().setInterval(function () {
      judge(interval);
    }, time);

    if (name) {
      waits[name] = interval;
    }

    judge();
  });
}
661473
public void await() {
		if (interrupted.get()) {
			return;
		}
		try {
			mainLatch.await();
		} catch (InterruptedException e) {
			Thread.currentThread().interrupt();
		}
	}
47345
function wait() {
        var isDone = false;
        var start = new Date().getTime();

        var interval = setInterval(() => {
            var now = new Date().getTime();
            if ((now - start) >= _retryInterval){
                clearInterval(interval);
                isDone = true;
            }
        }, 50);

        deasync.loopWhile(() => !isDone);
    }
945191
public void waitAndAssertForExpectedCondition(ExpectedCondition<?> condition, int timeout) {
        if (!waitForExpectedCondition(condition, timeout)) {
            fail(String.format("Element does not meet condition %1$s", condition.toString()));
        }
    }
145859
public void waitUntilFinish() {
        while (!finished) {
            synchronized (waitingLock) {
                if (config.isHaltOnError()) {
                    Throwable t = getError();
                    if (t != null && config.isHaltOnError()) {
                        if (t instanceof RuntimeException) {
                            throw (RuntimeException)t;
                        } else if (t instanceof Error) {
                            throw (Error)t;
                        } else {
                            throw new RuntimeException("error on monitor thread", t);
                        }
                    }
                }
                if (finished) {
                    return;
                }
                try {
                    waitingLock.wait();
                } catch (InterruptedException e) {
                    logger.error("Error occurred", e);
                }
            }
        }
    }
520090
def wait(*args)
      pattern = args.pop
      unless pattern
        raise ArgumentError, 'Please provide condition to wait for'
      end

      run(*args) do |out, _|
        raise if out =~ /#{pattern}/
      end
    rescue ExitError
      # noop
    end
524437
public function wait() : void
    {
        if (!empty($this->promises)) {
            Promise\settle($this->promises)->wait();
        }
    }
957224
public <S,V> void when(S subject, Feature<? super S, V> feature, Ticker ticker, Matcher<? super V> criteria, Action<? super S> action) {
        waitUntil(subject, feature, ticker, criteria);
        action.actOn(subject);
    }
1306602
function wait_for(condition, proceed)
		{
			function check()
			{
				// if the condition is met, then proceed
				if (condition())
				{
					return proceed()
				}

				message_timer += check_interval

				if (message_timer >= message_interval)
				{
					message_timer = 0

					tools.log.debug(`(${tools.webpack_assets_path} not found)`)
					tools.log.info('(waiting for the first Webpack build to finish)')
				}

				setTimeout(check, check_interval)
			}

			check()
		}
367964
private void waitForCoordinator()
   {
      LOG.info("Waiting to be released by the coordinator");
      try
      {
         lock.await();
      }
      catch (InterruptedException e)
      {
         Thread.currentThread().interrupt();
      }
   }
397738
def wait(self, *args, **kwargs):
        """"""
        if _debug: IOCB._debug("wait(%d) %r %r", self.ioID, args, kwargs)

        # waiting from a non-daemon thread could be trouble
        return self.ioComplete.wait(*args, **kwargs)
642512
def wait(self):
        """"""
        now = _monotonic()
        if now < self._ref:
            delay = max(0, self._ref - now)
            self.sleep_func(delay)
        self._update_ref()
388713
public synchronized void waitForStart()
	throws ServerException,
	       ClientException,
	       IOException {
	    try {
	        while(!isStarted() && !hasError()) {
		        wait();
	        }
	    } catch(InterruptedException e) {
            // break
	    }
	    checkError();
    }
603356
async def wait(self):
        
        while True:
            await self.eio.wait()
            await self.sleep(1)  # give the reconnect task time to start up
            if not self._reconnect_task:
                break
            await self._reconnect_task
            if self.eio.state != 'connected':
                break