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

Breadcrumb

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

function Driver::queue

Queue a microtask.

The queued callback MUST be executed immediately once the event loop gains control. Order of queueing MUST be preserved when executing the callbacks. Recursive scheduling can thus result in infinite loops, use with care.

Does NOT create an event callback, thus CAN NOT be marked as disabled or unreferenced. Use {

Parameters

\Closure(...):void $closure The callback to queue.:

mixed ...$args The callback arguments.:

See also

EventLoop::defer()} if you need these features.

2 methods override Driver::queue()
AbstractDriver::queue in vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php
Queue a microtask.
TracingDriver::queue in vendor/revolt/event-loop/src/EventLoop/Driver/TracingDriver.php
Queue a microtask.

File

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

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 queue(\Closure $closure, mixed ...$args) : void;

API Navigation

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