Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
GuzzleHttp\Promise\TaskQueue Class Reference
Inheritance diagram for GuzzleHttp\Promise\TaskQueue:
GuzzleHttp\Promise\TaskQueueInterface

Public Member Functions

 __construct (bool $withShutdown=true)
 
 add (callable $task)
 Adds a task to the queue that will be executed the next time run is called.
 
 disableShutdown ()
 The task queue will be run and exhausted by default when the process exits IFF the exit is not the result of a PHP E_ERROR error.
 
 isEmpty ()
 
 run ()
 Execute all of the pending task in the queue.
 

Member Function Documentation

◆ add()

GuzzleHttp\Promise\TaskQueue::add ( callable $task)

Adds a task to the queue that will be executed the next time run is called.

Implements GuzzleHttp\Promise\TaskQueueInterface.

◆ disableShutdown()

GuzzleHttp\Promise\TaskQueue::disableShutdown ( )

The task queue will be run and exhausted by default when the process exits IFF the exit is not the result of a PHP E_ERROR error.

You can disable running the automatic shutdown of the queue by calling this function. If you disable the task queue shutdown process, then you MUST either run the task queue (as a result of running your event loop or manually using the run() method) or wait on each outstanding promise.

Note: This shutdown will occur before any destructors are triggered.

◆ isEmpty()

GuzzleHttp\Promise\TaskQueue::isEmpty ( )

◆ run()

GuzzleHttp\Promise\TaskQueue::run ( )

Execute all of the pending task in the queue.

Implements GuzzleHttp\Promise\TaskQueueInterface.


The documentation for this class was generated from the following file: