OptionalthisArg: anyTime to wait until executing the queued lookups
Size of the chunks
Private ReadonlychunkSize of the chunks
PrivateprocessingPrivateprocessingSet of items that is currently being processed
Private ReadonlyprocessorProcessor fn
Private ReadonlyprocessTime to wait until executing the queued lookups
Private OptionalqueuePrivaterequestUsed to keep track of work items
Private ReadonlyrequestQueue with items that are going to be worked upon
Enqueue a work item ro be picked up
work item to enqueue
PrivateenqueueFind the first item that matches the predicate and returns the associated promise; use this to avoid enqueued ing the same item multiple items
Privateprocess
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.