# stockpack/2.1/vendor/guzzlehttp/promises/src/TaskQueueInterface.php

StockPack – Stock photos and AI images from Unsplash, Adobe Stock, Freepik and more, version 2.1. 26 lines.

- Page: https://pluginprobe.com/plugins/stockpack/2.1/code/vendor/guzzlehttp/promises/src/TaskQueueInterface.php
- Raw: https://pluginprobe.com/plugins/stockpack/2.1/raw/vendor/guzzlehttp/promises/src/TaskQueueInterface.php
- Modified: 2019-12-03T06:19:48+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/stockpack/2.1/code/vendor/guzzlehttp/promises/src/TaskQueueInterface.php#L10-L20`.

```php
<?php
namespace GuzzleHttp\Promise;

interface TaskQueueInterface
{
    /**
     * Returns true if the queue is empty.
     *
     * @return bool
     */
    public function isEmpty();

    /**
     * Adds a task to the queue that will be executed the next time run is
     * called.
     *
     * @param callable $task
     */
    public function add(callable $task);

    /**
     * Execute all of the pending task in the queue.
     */
    public function run();
}

```
