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

Breadcrumb

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

function TracingDriver::defer

Overrides Driver::defer

File

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

Class

TracingDriver

Namespace

Revolt\EventLoop\Driver

Code

public function defer(\Closure $closure) : string {
    $id = $this->driver
        ->defer(function (...$args) use ($closure) {
        $this->cancel($args[0]);
        return $closure(...$args);
    });
    $this->creationTraces[$id] = $this->formatStacktrace(\debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS));
    $this->enabledCallbacks[$id] = true;
    return $id;
}
RSS feed
Powered by Drupal