Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. StreamSelectDriver.php

function StreamSelectDriver::dispatch

Throws

\Throwable

Overrides AbstractDriver::dispatch

File

vendor/revolt/event-loop/src/EventLoop/Driver/StreamSelectDriver.php, line 117

Class

StreamSelectDriver

Namespace

Revolt\EventLoop\Driver

Code

protected function dispatch(bool $blocking) : void {
    if ($this->signalHandling) {
        \pcntl_signal_dispatch();
        while (!$this->signalQueue
            ->isEmpty()) {
            $signal = $this->signalQueue
                ->dequeue();
            foreach ($this->signalCallbacks[$signal] as $callback) {
                $this->enqueueCallback($callback);
            }
            $blocking = false;
        }
    }
    $this->selectStreams($this->readStreams, $this->writeStreams, $blocking ? $this->getTimeout() : 0.0);
    $now = $this->now();
    while ($callback = $this->timerQueue
        ->extract($now)) {
        $this->enqueueCallback($callback);
    }
}
RSS feed
Powered by Drupal