/** * {@inheritdoc} */ protected function dispatch(bool $blocking) { $flags = \Ev::RUN_ONCE; if (!$blocking) { $flags |= \Ev::RUN_NOWAIT; } $this->loop->run($flags); // Dispatch I/O, timer, and signal callbacks. }
/** * {@inheritdoc} */ protected function dispatch(int $level) { if ($this->deferred || $this->enable || $this->running <= $level) { $this->loop->run(\Ev::RUN_ONCE | \Ev::RUN_NOWAIT); } else { $this->loop->run(\Ev::RUN_ONCE); } }
/** * {@inheritdoc} */ public function run() { $this->running = true; while ($this->running) { $this->nextTickQueue->tick(); $this->futureTickQueue->tick(); $flags = \Ev::RUN_ONCE; if (!$this->running || !$this->nextTickQueue->isEmpty() || !$this->futureTickQueue->isEmpty()) { $flags |= \Ev::RUN_NOWAIT; } elseif (!$this->readEvents && !$this->writeEvents && !$this->timerEvents->count()) { break; } $this->loop->run($flags); } }
/** * {@inheritdoc} */ protected function dispatch($blocking) { $this->handle->run($blocking ? \Ev::RUN_ONCE : \Ev::RUN_ONCE | \Ev::RUN_NOWAIT); }