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

Breadcrumb

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

function EventLoop::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.

File

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

Class

EventLoop
Accessor to allow global access to the event loop.

Namespace

Revolt

Code

public static function queue(\Closure $closure, mixed ...$args) : void {
    self::getDriver()->queue($closure, ...$args);
}

API Navigation

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