* Refill the prefetch buffer. Returns only after the buffer is full, or * the upstream source is exhausted.
()
| 1114 | * the upstream source is exhausted. |
| 1115 | */ |
| 1116 | protected refill() { |
| 1117 | while (!this.buffer.isFull()) { |
| 1118 | const v = this.upstream.next(); |
| 1119 | this.buffer.push(v); |
| 1120 | } |
| 1121 | } |
| 1122 | |
| 1123 | next(): Promise<IteratorResult<T>> { |
| 1124 | this.refill(); |
no test coverage detected