Loops through running.
342706
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $runner = new RunCommand($this->logger);
        $runner->setMaxBuilds(1);
        $runner->setDaemon(false);

        /** @var \PHPCI\Store\BuildStore $store */
        $store = Factory::getStore('Build');
        $service = new BuildService($store);

        $builds = $store->getLatestBuilds(null, 1);
        $lastBuild = array_shift($builds);
        $service->createDuplicateBuild($lastBuild);

        $runner->run(new ArgvInput(array()), $output);
    }
574031
def run(self):
        """"""
        self.busy = True

        for i in range(9):
            self.counter += 1
            time.sleep(0.5)
            pass
        self.counter += 1
        
        self.busy = False
        return
784538
def run(self):
        
        self._logger.info('runner started: %s', self)
        try:
            with self._lock:
                assert not self.running.is_set() and self._stopped.is_set(), 'cannot re-run: %s' % self
                self.running.set()
                self._stopped.clear()
            self._run()
        except Exception:
            self._logger.exception('runner aborted: %s', self)
            raise
        else:
            self._logger.info('runner stopped: %s', self)
        finally:
            with self._lock:
                self.running.clear()
                self._stopped.set()
1174204
def run():
    """"""
    # Setup Multiprocessing
    # manager = multiprocessing.Manager()
    Settings.pool = multiprocessing.Pool(Settings.jobs)

    # Optimize Files
    record_dirs, bytes_in, bytes_out, nag_about_gifs, errors = \
        _walk_all_files()

    # Shut down multiprocessing
    Settings.pool.close()
    Settings.pool.join()

    # Write timestamps
    for filename in record_dirs:
        timestamp.record_timestamp(filename)

    # Finish by reporting totals
    stats.report_totals(bytes_in, bytes_out, nag_about_gifs, errors)
738602
public void run() {
    int maxruns = this.maxruns, maxsmall = this.maxsmall;
    double oldchi = getChiSq();
    while(maxruns-- > 0) {
      iterate();
      double newchi = getChiSq(), deltachi = newchi - oldchi;
      oldchi = newchi;
      // stop condition: only a small improvement in Chi.
      if(deltachi < 0 && deltachi > -small && --maxsmall < 0) {
        break;
      }
    }
  }
798333
private void runAll(RunNode next) {
        for (; ; ) {
            final RunNode current = next;
            run(current);
            if ((next = current.get()) == null) { // try advance, if we get null test
                if (last.compareAndSet(current, null)) {
                    return; // end-of-queue: we're done.
                } else {
                    //noinspection StatementWithEmptyBody
                    while ((next = current.get()) == null) {
                        // Thread.onSpinWait(); in Java 9
                    }
                }
            }
        }
    }
188871
def iterate(self):
        
        if not self._inLoop:
            raise RuntimeError('run loop not started')
        elif self._driverLoop:
            raise RuntimeError('iterate not valid in driver run loop')
        self.proxy.iterate()
398764
private static void runHooks() {
        for (int i=0; i < MAX_SYSTEM_HOOKS; i++) {
            try {
                Runnable hook;
                synchronized (lock) {
                    // acquire the lock to make sure the hook registered during
                    // shutdown is visible here.
                    currentRunningHook = i;
                    hook = hooks[i];
                }
                if (hook != null) hook.run();
            } catch(Throwable t) {
                if (t instanceof ThreadDeath) {
                    ThreadDeath td = (ThreadDeath)t;
                    throw td;
                }
            }
        }
    }
1077518
def run
      raise 'Already running' if @running
      @stop = false
      @running = true
      begin
        until @stop
          mainloop
        end
      ensure
        File.unlink(@socket) if @socket
        @ios.each{ |io| io.close rescue nil }
      end
    end
1358237
def _heartbeat_loop(self):
        """"""
        self.logger.debug("running main heartbeat thread")
        while not self.closed:
            time.sleep(self.settings['SLEEP_TIME'])
            self._report_self()
588314
def run(self):
        
        try:
            self._loop()
        except Exception:
            # Send the exception through the exc_queue, so the parent
            # process can check it.
            typ, val, tb = sys.exc_info()
            tb_lines = traceback.format_exception(typ, val, tb)
            self.exc_queue.put((val, tb_lines))
1047959
public final void running () {
		Status previousStatus = status;
		status = Status.RUNNING;
		if (tree.listeners != null && tree.listeners.size > 0) tree.notifyStatusUpdated(this, previousStatus);
		if (control != null) control.childRunning(this, this);
	}
84146
def __add_running_bp(self, tid, bp):
        ""
        if tid not in self.__runningBP:
            self.__runningBP[tid] = set()
        self.__runningBP[tid].add(bp)
237719
def runner(coro):
    """"""

    @wraps(coro)
    def inner(self, *args, **kwargs):
        if self.mode == 'async':
            return coro(self, *args, **kwargs)
        return self._loop.run_until_complete(coro(self, *args, **kwargs))

    return inner
1113281
def _loop_thread_main(self):
        """"""

        asyncio.set_event_loop(self.loop)
        self._loop_check.inside_loop = True

        try:
            self._logger.debug("Starting loop in background thread")
            self.loop.run_forever()
            self._logger.debug("Finished loop in background thread")
        except:  # pylint:disable=bare-except;This is a background worker thread.
            self._logger.exception("Exception raised from event loop thread")
        finally:
            self.loop.close()
278154
private void pushRun(int runBase, int runLen) {
        this.runBase[stackSize] = runBase;
        this.runLen[stackSize] = runLen;
        stackSize++;
    }
1052992
public function run()
    {
        $running = null;
        do {
            curl_multi_exec($this->_mh, $running);
            $this->_updated = false;
            while ($info = curl_multi_info_read($this->_mh)) {
                $index = false;
                foreach ($this->_requests as $i => $item) {
                    if ($item->curl === $info['handle']) {
                        $index = $i;
                        break;
                    }
                }
                if ($index === false) {
                    throw new \Exception('Curl request not founded in list');
                }
                $request = $this->_requests[$index];
                unset($this->_requests[$index]);

                $content  = curl_multi_getcontent($request->curl);
                $response = curl_getinfo($request->curl);

                curl_multi_remove_handle($this->_mh, $info['handle']);

                if ($info['result'] === CURLE_OK) {
                    $this->onSuccess($request, $response, $content);
                } else {
                    $errCode = $info['result'];
                    $errMsg  = function_exists('curl_strerror') ? curl_strerror($errCode) : "cURL error {$errCode}";
                    $this->onError($request, $response, $content, $errCode, $errMsg);
                }
                $this->onAlways($request, $response, $content);
            }
            curl_multi_select($this->_mh, 1);
        } while ($running>0 || $this->_updated);
    }