Waits as long as the execution_mode is in paused or step_mode
169100
def _wait_while_in_pause_or_in_step_mode(self):
        
        while (self._status.execution_mode is StateMachineExecutionStatus.PAUSED) \
                or (self._status.execution_mode is StateMachineExecutionStatus.STEP_MODE):
            try:
                self._status.execution_condition_variable.acquire()
                self.synchronization_counter += 1
                logger.verbose("Increase synchronization_counter: " + str(self.synchronization_counter))
                self._status.execution_condition_variable.wait()
            finally:
                self._status.execution_condition_variable.release()
729864
private void waitUntilFlowPreparationFinish() throws InterruptedException {
    final Duration SLEEP_INTERVAL = Duration.ofSeconds(5);
    while (this.preparingFlowCount.intValue() != 0) {
      logger.info(this.preparingFlowCount + " flow(s) is/are still being setup before complete "
          + "deactivation.");
      Thread.sleep(SLEEP_INTERVAL.toMillis());
    }
  }
489344
@Nullable
    private Integer waitFor(Process process) {
        try {
            return process.waitFor();
        } catch (InterruptedException e) {
            log.info("interrupted in Process.waitFor");
            return null;
        }
    }
138144
public void waitForExit() {
        if (shutdownHook != null) {
            synchronized (shutdownHookMonitor) {
                if (shutdownHook != null) {
                    synchronized (frameworkProcessMonitor) {
                        try {
                            frameworkProcess.waitFor();
                            shutdown();
                        // CHECKSTYLE:SKIP
                        } catch (Throwable e) {
                            shutdown();
                        }
                    }
                }
            }
        }
    }
105075
def wait(self):
        """"""
        self._returncode = self.process.wait()
        try:
            self.process.stderr.close()
        except:
            pass
        self.set_status(self.S_DONE, "status set to Done")

        return self._returncode
712787
def wait_for_mode(self, mode, timeout=None):
        '''
        '''

        if not isinstance(mode, VehicleMode):
            mode = VehicleMode(mode)

        self.mode = mode

        self.wait_for(lambda: self.mode.name == mode.name,
                      timeout=timeout,
                      errmsg='failed to set flight mode')
358393
def on_pause(self):
        """"""
        self.engine.commit()
        self.strings.save()
        self.funcs.save()
        self.config.write()
762737
def wait_until_done(opts={})
      raise "Threadz: thread deadlocked because batch job was never started" if @latent && !@started

      timeout = opts.key?(:timeout) ? opts[:timeout] : 0
      @sleeper.wait(timeout) unless completed?
      errors = self.job_errors
      if !errors.empty? && !@error_handler
        raise JobError.new(errors)
      end
    end
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)
801930
def wait_to_end(self, pids=[]):
        '''
        

        '''
        actual_pids = self._get_pids(pids)
        return self.wait_for(pids=actual_pids, status_list=process_result_statuses)
751434
private void waitForComponentToComeUp() {
        LOGGER.entering();
        for (int i = 0; i < 60; i++) {
            try {
                // Sleep for 3 seconds.
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                throw new IllegalStateException(e.getMessage(), e);
            }
            if (getLauncher().isRunning()) {
                LOGGER.exiting();
                return;
            }
        }
        throw new IllegalStateException(String.format("%s can not be contacted.", getLocalServerComponent().getClass()
                .getSimpleName()));
    }
1157847
def wait_to_start(self, pids=[]):
        '''
        

        '''
        actual_pids = self._get_pids(pids)
        return self.wait_for(pids=actual_pids, status_list=process_result_statuses+['in_process'])
1067704
def wait_while(self, condition, *args, **kw):
    
    return self.wait_for(lambda: not condition(), *args, **kw)
1045395
def wait_on_action(self, action_id, _check_output=subprocess.check_output):
        
        data = amulet.actions.get_action_output(action_id, full_output=True)
        return data.get(u"status") == "completed"
96944
def _wait_event(self, reading):
        ""
        with self._registered(reading, not reading):
            (self._readable if reading else self._writable).wait()

        if scheduler.state.interrupted:
            raise IOError(errno.EINTR, "interrupted system call")
1228829
def wait_on(event)
      $shreduler.shredule(Shred.current, event, $shreduler.event_clock)
      Shred.current.pause
    end
1352003
def wait_for(self,
               condition,
               interval = DEFAULT_WAIT_INTERVAL,
               timeout  = DEFAULT_WAIT_TIMEOUT):
    

    start = time.time()

    # at least execute the check once!
    while True:
      res = condition()
      if res:
        return res

      # timeout?
      if time.time() - start > timeout:
        break

      # wait a bit
      time.sleep(interval)

    # timeout occured!
    raise WaitTimeoutError("wait_for timed out")