Skip to content

Latest commit

 

History

History
101 lines (50 loc) · 1.43 KB

File metadata and controls

101 lines (50 loc) · 1.43 KB
hide_title true
custom_edit_url
pagination_prev
pagination_next

Home > @rushstack/node-core-library > AsyncQueue

AsyncQueue class

A queue that allows for asynchronous iteration. During iteration, the queue will wait until the next item is pushed into the queue before yielding. If instead all queue items are consumed and all callbacks have been called, the queue will return.

Signature:

export declare class AsyncQueue<T> implements AsyncIterable<[T, () => void]> 

Implements: AsyncIterable<[T, () => void]>

Constructors

Constructor

Modifiers

Description

(constructor)(iterable)

Constructs a new instance of the AsyncQueue class

Methods

Method

Modifiers

Description

[Symbol.asyncIterator]()

push(item)

Adds an item to the queue.