Queue
A basic FIFO queue that you can enqueue tasks into and flush enqueued tasks.
new Queue(name [, callbacks])
Creates a queue instance.
Parameters
- name
{String}:The name of the queue used for logging.
- callbacks
{Object}:Optional. An object containing callbacks
onFirstTaskand/oronComplete.onFirstTask- is called when the first task is added to an empty queueonComplete- is called when the queue is empty.
Returns
{Object}:
An instance of Queue.