Runs the interval loop.
187517
def _run(self):
        

        def get_next_interval():
            start_time = time.time()
            start = 0 if self.eager else 1
            for count in itertools.count(start=start):
                yield max(start_time + count * self.interval - time.time(), 0)
        interval = get_next_interval()
        sleep_time = next(interval)
        while True:
            # sleep for `sleep_time`, unless `should_stop` fires, in which
            # case we leave the while loop and stop entirely
            with Timeout(sleep_time, exception=False):
                self.should_stop.wait()
                break

            self.handle_timer_tick()

            self.worker_complete.wait()
            self.worker_complete.reset()

            sleep_time = next(interval)
1203280
def run(self):
        """"""
        self.running = True
        while self.running:
            for fd, event in self.epoll.poll(self.epoll_timeout):
                callback = self.callbacks.get(fd)
                if callback:
                    callback()
278149
def iterate(self, delay=None):
        
        self.runUntilCurrent()
        self.doEvents()
        self.doIteration(delay)
1007631
def run(self):
        """"""
        event_handler = Handler()
        threads = []
        paths = [os.path.join(cwd, "content"), os.path.join(cwd, "templates")]

        for i in paths:
            targetPath = str(i)
            self.observer.schedule(event_handler, targetPath, recursive=True)
            threads.append(self.observer)

        self.observer.start()

        try:
            while True:
                time.sleep(5)
        except:
            self.observer.stop()
            print("\nObserver stopped.")

        self.observer.join()
169535
def start(self, interval_s):
    
    if self.running:
      return False

    self.stopped.clear()

    def _execute():
      # Always execute immediately once
      if not self.method() and self.stop_if_false:
        return
      while not self.stopped.wait(interval_s):
        if not self.method() and self.stop_if_false:
          return

    self.thread = threading.Thread(target=_execute)
    self.thread.daemon = True
    self.thread.start()
    return True
531692
def run_chart_protocol(self, interval):
        
        self.charter.setup(interval)
        return self.charter.run()
94609
public void run()
    {
        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
        if (isTraceOn && tc.isDebugEnabled())
            Tr.entry(tc, "run");

        int numPools;
        synchronized (this)
        {
            if (ivIsCanceled)
            {
                return;
            }

            ivIsRunning = true;

            numPools = pools.size();
            if (numPools > 0)
            {
                if (numPools > poolArray.length)
                {
                    poolArray = new PoolImplBase[numPools];
                }

                pools.toArray(poolArray);
            }
        }

        try
        {
            for (int i = 0; i < poolArray.length && poolArray[i] != null; ++i) // 147140
            {
                if (poolArray[i].inactive)
                {
                    poolArray[i].periodicDrain();
                }
                else
                {
                    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                        Tr.debug(tc, "setting inactive: " + poolArray[i]);
                    poolArray[i].inactive = true;
                }

                // Allow pools to be GC'ed promptly after being removed.     PM54417
                poolArray[i] = null;
            }
        } finally
        {
            synchronized (this)
            {
                ivIsRunning = false;
                if (ivIsCanceled)
                {
                    notify();
                }
                else if (!pools.isEmpty())
                {
                    startAlarm();
                }
                else
                {
                    ivScheduledFuture = null;
                }
            }
        }

        if (isTraceOn && tc.isDebugEnabled())
            Tr.exit(tc, "run");
    }
242123
def start(self, interval, now=True):
        
        if interval < 0:
            raise ValueError('interval must be >= 0')

        if self._running:
            self.stop()

        self._running = True
        self._interval = interval
        if now:
            self._self_thread = hub.spawn_after(0, self)
        else:
            self._self_thread = hub.spawn_after(self._interval, self)
1366694
function run() {
  const current = now();
  const queue = timeoutQueue.slice();
  let interval = INTERVAL_MAX;

  timeoutQueue.length = 0;

  // Reset
  if (runRafId > 0 || runTimeoutId > 0) {
    stop();
  }

  for (let i = queue.length - 1; i >= 0; i--) {
    const item = queue[i];

    if (!item.cancelled) {
      const duration = item.time - current;

      if (duration <= 0) {
        if (isDev) {
          debug('timeout triggered for "%s" at %s', item.id, new Date().toLocaleTimeString());
        }
        item.fn.apply(item.fn, item.args);
      } else {
        // Store smallest duration
        if (duration < interval) {
          interval = duration;
        }
        timeoutQueue.push(item);
      }
    }
  }

  // Loop
  if (timeoutQueue.length > 0) {
    // Use raf if requested interval is less than cutoff
    if (interval < INTERVAL_CUTOFF) {
      runRafId = raf(run);
    } else {
      runTimeoutId = setTimeout(run, interval);
    }
  }
}
416832
def run(self):
        
        while True:  # make sure to run at least once before exiting
            with self._lock:
                self._update(self._data)
            if self._done:
                break
            time.sleep(1)
1363572
public function run()
    {
        pcntl_signal(SIGINT, array($this, 'stop'));
        pcntl_signal(SIGTERM, array($this, 'stop'));

        $this->running = true;
        while ($this->running) {
            $this->process();
        }
    }
970440
public void run()
	{
		while (true) {
			final long start = System.currentTimeMillis();
			long remaining;
			Cache c;
			synchronized (lock) {
				c = cache;
				remaining = sweepInterval * 1000;
				while (remaining > 0 && cache != null) {
					try {
						lock.wait(remaining);
					}
					catch (final InterruptedException e) {}
					remaining = start + sweepInterval * 1000 - System.currentTimeMillis();
				}
				if (cache == null)
					break;
			}
			c.removeExpired();
		}
	}
1330373
function run() {
	var len = series.length,
		ctx = context(),
		i = 0;

	series[ i ].call( ctx, next );

	function next() {
		i += 1;
		if ( i < len ) {
			series[ i ].call( ctx, next );
		}
	}
}
1242807
protected void run() {

        Scheduler.get().scheduleFixedDelay(new RepeatingCommand() {

            public boolean execute() {

                if (CmsBroadcastTimer.shouldKeepRunning()) {
                    getBroadcast();
                    return true;
                }
                return false;
            }
        }, PING_INTERVAL);
    }
723427
def run(self):
        """"""
        i = 0
        operation_count = int(self._parameters['operationcount'])
        while i < operation_count:
            i += 1
            weight = random.uniform(0, self._total_weight)
            for j in range(len(self._weights)):
                if weight <= self._weights[j]:
                    do_operation(self._database, self._keys,
                                 self._parameters['table'],
                                 self._operations[j], self._latencies_ms)
                    break
685622
def _iterate(self, delay=None, fromqt=False):
        
        self.runUntilCurrent()
        self.doIteration(delay, fromqt)
1031356
def start(self, interval):
        """"""
        if self._thread:
            self.cancel()
        self._event.clear()
        self._thread = hub.spawn(self._timer, interval)