SyncPromiseQueue
in package
Queue for deferred execution of SyncPromise tasks.
Owns the shared queue and provides the run loop for processing promises.
Tags
Table of Contents
- count() : int
- Return the number of tasks in the queue.
- enqueue() : void
- Adds a task to the queue.
- isEmpty() : bool
- Check if the queue is empty.
- queue() : SplQueue<string|int, Task>
- TODO change to protected in next major version.
- run() : void
- Process all queued promises until the queue is empty.
Methods
count()
Return the number of tasks in the queue.
public
static count() : int
Return values
int —enqueue()
Adds a task to the queue.
public
static enqueue(Task $task) : void
Parameters
- $task : Task
Return values
void —isEmpty()
Check if the queue is empty.
public
static isEmpty() : bool
Return values
bool —queue()
TODO change to protected in next major version.
public
static queue() : SplQueue<string|int, Task>
Return values
SplQueue<string|int, Task> —run()
Process all queued promises until the queue is empty.
public
static run() : void
