function StreamSelectDriver::dispatch
Throws
\Throwable
Overrides AbstractDriver::dispatch
File
-
vendor/
revolt/ event-loop/ src/ EventLoop/ Driver/ StreamSelectDriver.php, line 117
Class
Namespace
Revolt\EventLoop\DriverCode
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);
}
}