feat(BackpressuredArray): Add method to check if items are present in BackpressuredArray
This commit is contained in:
@@ -34,6 +34,10 @@ export class BackpressuredArray<T> {
|
||||
return this.data.length < this.highWaterMark;
|
||||
}
|
||||
|
||||
public checkHasItems(): boolean {
|
||||
return this.data.length > 0;
|
||||
}
|
||||
|
||||
waitForSpace(): Promise<void> {
|
||||
return new Promise<void>((resolve) => {
|
||||
if (this.checkSpaceAvailable()) {
|
||||
|
||||
Reference in New Issue
Block a user