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

Breadcrumb

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

function Driver::run

Run the event loop.

One iteration of the loop is called one "tick". A tick covers the following steps:

1. Activate callbacks created / enabled in the last tick / before `run()`. 2. Execute all enabled deferred callbacks. 3. Execute all due timer, pending signal and actionable stream callbacks, each only once per tick.

The loop MUST continue to run until it is either stopped explicitly, no referenced callbacks exist anymore, or an exception is thrown that cannot be handled. Exceptions that cannot be handled are exceptions thrown from an error handler or exceptions that would be passed to an error handler but none exists to handle them.

Throws

\Error Thrown if the event loop is already running.

2 methods override Driver::run()
AbstractDriver::run in vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php
Run the event loop.
TracingDriver::run in vendor/revolt/event-loop/src/EventLoop/Driver/TracingDriver.php
Run the event loop.

File

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

Class

Driver
The driver MUST run in its own fiber and execute callbacks in a separate fiber. If fibers are reused, the driver needs to call {

Namespace

Revolt\EventLoop

Code

public function run() : void;

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal