BBnepal-Accounts/vendor/guzzlehttp/promises/src/TaskQueueInterface.php

25 lines
450 B
PHP
Raw Normal View History

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