@shutterstock/p-map-iterable
    Preparing search index...

    Class BlockingQueue<Element>

    enqueue blocks when the queue is full, until an item is read with dequeue, or done dequeue blocks when the queue is empty, until an item is added with enqueue, or done done must be called when no more items will be added dequeue returns undefined there are no more items and processing is complete

    Type Parameters

    • Element

    Hierarchy (View Summary)

    Index
    • Gets an element when one is ready, waits if none are ready.

      Returns Promise<Element | undefined>

      Element or undefined if queue is empty and done has been called

    • Indicate that no more items will be enqueued.

      This releases all readers blocked on enqueue

      Returns void

    • Add an item to the queue, wait if the queue is full.

      Parameters

      Returns Promise<void>