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\PromiseCode
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();
}
}
});
}
}