function AbstractDriver::invokeCallbacks
2 calls to AbstractDriver::invokeCallbacks()
- AbstractDriver::createLoopFiber in vendor/
revolt/ event-loop/ src/ EventLoop/ Internal/ AbstractDriver.php - AbstractDriver::tick in vendor/
revolt/ event-loop/ src/ EventLoop/ Internal/ AbstractDriver.php - Executes a single tick of the event loop.
File
-
vendor/
revolt/ event-loop/ src/ EventLoop/ Internal/ AbstractDriver.php, line 492
Class
- AbstractDriver
- Event loop driver which implements all basic operations to allow interoperability.
Namespace
Revolt\EventLoop\InternalCode
private function invokeCallbacks() : void {
while (!$this->microtaskQueue
->isEmpty() || !$this->callbackQueue
->isEmpty()) {
/** @noinspection PhpUnhandledExceptionInspection */
$yielded = $this->callbackFiber
->isStarted() ? $this->callbackFiber
->resume() : $this->callbackFiber
->start();
if ($yielded !== $this->internalSuspensionMarker) {
$this->createCallbackFiber();
}
if ($this->interrupt) {
$this->invokeInterrupt();
}
}
}