Optional
thisArg: anyTime to wait until executing the queued lookups
Size of the chunks
Private
Readonly
chunkSize of the chunks
Private
Readonly
processTime to wait until executing the queued lookups
Private
processingPrivate
processingSet of items that is currently being processed
Private
Readonly
processorProcessor fn
Private
Optional
queuePrivate
requestUsed to keep track of work items
Private
Readonly
requestQueue with items that are going to be worked upon
Enqueue a work item ro be picked up
work item to enqueue
Private
enqueueFind the first item that matches the predicate and returns the associated promise; use this to avoid enqueued ing the same item multiple items
Private
process
Deferred work processor class which queues work items and returns an awaitable deferred promise. This class supports bulkification of otherwise singular work items. A processor function/delegate is passed which will process all queue items in bulk. Optionally a chunk size can be specified which determines the size of the chunks passed to the processor delegate.