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

Breadcrumb

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

function TaskQueue::__construct

File

vendor/guzzlehttp/promises/src/TaskQueue.php, line 23

Class

TaskQueue
A task queue that executes tasks in a FIFO order.

Namespace

GuzzleHttp\Promise

Code

public function __construct(bool $withShutdown = true) {
    if ($withShutdown) {
        register_shutdown_function(function () : void {
            if ($this->enableShutdown) {
                // Only run the tasks if an E_ERROR didn't occur.
                $err = error_get_last();
                if (!$err || $err['type'] ^ E_ERROR) {
                    $this->run();
                }
            }
        });
    }
}

API Navigation

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