Queue Class
Helper queue class to allow async push / pull It's essentially a pipe allowing multiple writers, and single reader
Signature
export declare class Queue<T> implements IStream<T>
Implements: IStream
Type Parameters
Parameter | Description |
---|---|
T |
Methods
Method | Return Type | Description |
---|---|---|
pushCore(value) | void | |
pushDone() | void | |
pushError(error) | void | |
pushValue(value) | void | |
read() | Promise<IStreamResult<T>> |
Method Details
pushCore
Signature
protected pushCore(value: Promise<IStreamResult<T>>): void;
Parameters
Parameter | Type | Description |
---|---|---|
value | Promise<IStreamResult<T>> |
pushDone
Signature
pushDone(): void;
pushError
Signature
pushError(error: any): void;
Parameters
Parameter | Type | Description |
---|---|---|
error | any |
pushValue
Signature
pushValue(value: T): void;
Parameters
Parameter | Type | Description |
---|---|---|
value | T |
read
Signature
read(): Promise<IStreamResult<T>>;
Returns
Return type: Promise<IStreamResult<T>>