WooCommerce Code Reference

SyncPromiseQueue
in package

Queue for deferred execution of SyncPromise tasks.

Owns the shared queue and provides the run loop for processing promises.

Tags
phpstan-type

Task callable(): void

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