Run OSLOM and wait for the process to finish.
320719
def run(self, oslom_exec, oslom_args, log_filename):
        """"""
        args = [oslom_exec, "-f", self.get_path(OslomRunner.TMP_EDGES_FILE)]
        args.extend(oslom_args)
        with open(log_filename, "w") as logwriter:
            start_time = time.time()
            retval = subprocess.call(
                args, cwd=self.working_dir,
                stdout=logwriter, stderr=subprocess.STDOUT)
            self.last_result = {
                "args": args, "retval": retval,
                "time": time.time() - start_time,
                "output_dir": self.get_path(
                    "{}_oslo_files".format(OslomRunner.TMP_EDGES_FILE))
            }
            return self.last_result
915182
async def wait_and_quit(loop):
	""""""
	from pylp.lib.tasks import running
	if running:
		await asyncio.wait(map(lambda runner: runner.future, running))
144535
def wait_for_ipykernel(self, service_name, timeout=10):
        """"""
        kernel_line = self._services[service_name].logs.tail.until(
            lambda line: "--existing" in line[1], timeout=10, lines_back=5
        )
        return kernel_line.replace("--existing", "").strip()
55193
def run(self):
        """"""
        ret = eventlet.spawn(self.context(self.func))
        eventlet.sleep(self.seconds)
        try:
            ret.wait()
        except Exception:  # pylint: disable=broad-except
            traceback.print_exc()
        self.thread = eventlet.spawn(self.run)
423415
private function waitForAllToFinish(): void
    {
        do {
            foreach ($this->workers as $key => $worker) {
                if (!$worker->isRunning()) {
                    unset($this->workers[$key]);
                }
            }
            usleep(10000);
            $this->printOutput();
        } while (\count($this->workers) > 0);
    }
151150
def start(self):
        
        if self:
            raise ProcessError(
                "Process '%s' has been already started" % self.name)
        first_run = not self.has_started
        # Run process
        self._process = self._process_cls(*self._process_args)
        self._process.daemon = False
        self._process.start()
        # Wait unless process is successfully started
        if first_run and self._wait_unless_ready:
            if self._timeout:
                stop_time = time.time() + self._timeout
                while time.time() < stop_time and not self._process.ready:
                    time.sleep(0.25)
                if not self._process.ready:
                    raise ProcessError(
                        "Timeout during start process '%s'" % self.name)
            else:
                while not self._process.ready:
                    time.sleep(0.25)
69088
def run_app(self):
        """"""
        # Update system arguments
        sys.argv[0] = sys.executable
        sys.argv[1] = '{}.py'.format(sys.argv[1])

        # Make sure to exit with the return value from the subprocess call
        self._app_process = subprocess.Popen(sys.argv)
        return self._app_process.wait()
1174548
async def _wait_execute(self, address, command, args, kw):
        """"""
        conn = await self.acquire(command, args)
        try:
            return (await conn.execute(command, *args, **kw))
        finally:
            self.release(conn)
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
785364
def wait_to_start(self, allow_failure=False):
        
        self._started.wait()

        if self._crashed and not allow_failure:
            self._thread.join()
            raise RuntimeError('Setup failed, see {} Traceback'
                               'for details.'.format(self._thread.name))
1020850
def wait_for_running(self):
        """"""
        self.server_attrs = self.consul.find_running(
                self.server_attrs,
                self.launch_timeout_s,
                )
158546
def run(self):
        """"""
        self.aotask.StartTask()
        self.aotask.wait() # don't return until generation finished
        self.aotask.stop()
        self.aotask = None
1290270
def run():
    """"""
    args = parse()
    build_results = [build(p) for p in glob.iglob(glob_path)]

    if not args['publish']:
        return

    for entry in build_results:
        publish(entry)
105448
def run(self, asynchronous=False):
        '''
        
        '''
        log.debug('Process Manager starting!')
        appendproctitle(self.name)

        # make sure to kill the subprocesses if the parent is killed
        if signal.getsignal(signal.SIGTERM) is signal.SIG_DFL:
            # There are no SIGTERM handlers installed, install ours
            signal.signal(signal.SIGTERM, self.kill_children)
        if signal.getsignal(signal.SIGINT) is signal.SIG_DFL:
            # There are no SIGINT handlers installed, install ours
            signal.signal(signal.SIGINT, self.kill_children)

        while True:
            log.trace('Process manager iteration')
            try:
                # in case someone died while we were waiting...
                self.check_children()
                # The event-based subprocesses management code was removed from here
                # because os.wait() conflicts with the subprocesses management logic
                # implemented in `multiprocessing` package. See #35480 for details.
                if asynchronous:
                    yield gen.sleep(10)
                else:
                    time.sleep(10)
                if not self._process_map:
                    break
            # OSError is raised if a signal handler is called (SIGTERM) during os.wait
            except OSError:
                break
            except IOError as exc:
                # IOError with errno of EINTR (4) may be raised
                # when using time.sleep() on Windows.
                if exc.errno != errno.EINTR:
                    raise
                break
651589
def pg_wait(self):
        """"""
        retries = 10
        while retries:
            retries = retries - 1
            try:
                self._run(["heroku", "pg:wait", "--app", self.name])
            except subprocess.CalledProcessError:
                time.sleep(5)
                if not retries:
                    raise
            else:
                break
1285592
def wait_until_done(self):
        
        wait = 1
        while True:
            time.sleep(wait)
            self.get_info()
            if self.info['status']['isFinished']:
                break
            # implements a crude exponential back off
            wait = min(wait * 2, 60)
1299095
def run(self):
        """"""
        self.state = True
        self.hm.KeyAll = self.handler
        self.hm.HookKeyboard()
        while self.state:
            time.sleep(0.01)
            pythoncom.PumpWaitingMessages()