Files
apimacro/vendor/guzzlehttp/promises/src/TaskQueueInterface.php

25 lines
450 B
PHP
Raw Normal View History

2024-05-07 12:17:25 +02:00
<?php
2024-05-17 12:24:19 +00:00
declare(strict_types=1);
2024-05-07 12:17:25 +02:00
namespace GuzzleHttp\Promise;
interface TaskQueueInterface
{
/**
* Returns true if the queue is empty.
*/
2024-05-17 12:24:19 +00:00
public function isEmpty(): bool;
2024-05-07 12:17:25 +02:00
/**
* Adds a task to the queue that will be executed the next time run is
* called.
*/
2024-05-17 12:24:19 +00:00
public function add(callable $task): void;
2024-05-07 12:17:25 +02:00
/**
* Execute all of the pending task in the queue.
*/
2024-05-17 12:24:19 +00:00
public function run(): void;
2024-05-07 12:17:25 +02:00
}