Subversion Repositories cheapmusic

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
103 - 1
<?php
2
namespace GuzzleHttp\Promise;
3
 
4
interface TaskQueueInterface
5
{
6
    /**
7
     * Returns true if the queue is empty.
8
     *
9
     * @return bool
10
     */
11
    public function isEmpty();
12
 
13
    /**
14
     * Adds a task to the queue that will be executed the next time run is
15
     * called.
16
     *
17
     * @param callable $task
18
     */
19
    public function add(callable $task);
20
 
21
    /**
22
     * Execute all of the pending task in the queue.
23
     */
24
    public function run();
25
}