TaskSystem/vendor/guzzlehttp/promises/src/TaskQueueInterface.php

25 lines
433 B
PHP
Raw Normal View History

2023-07-15 10:16:32 +08:00
<?php
namespace GuzzleHttp\Promise;
interface TaskQueueInterface
{
/**
* Returns true if the queue is empty.
2023-07-18 11:17:17 +08:00
*
* @return bool
2023-07-15 10:16:32 +08:00
*/
2023-07-18 11:17:17 +08:00
public function isEmpty();
2023-07-15 10:16:32 +08:00
/**
* Adds a task to the queue that will be executed the next time run is
* called.
*/
2023-07-18 11:17:17 +08:00
public function add(callable $task);
2023-07-15 10:16:32 +08:00
/**
* Execute all of the pending task in the queue.
*/
2023-07-18 11:17:17 +08:00
public function run();
2023-07-15 10:16:32 +08:00
}