()
| 588 | } |
| 589 | |
| 590 | #pullFromSource() { |
| 591 | if (this.#sourceExhausted || this.#cancelled) return; |
| 592 | |
| 593 | try { |
| 594 | this.#sourceIterator ||= this.#source[SymbolIterator](); |
| 595 | |
| 596 | const result = this.#sourceIterator.next(); |
| 597 | |
| 598 | if (result.done) { |
| 599 | this.#sourceExhausted = true; |
| 600 | } else { |
| 601 | this.#buffer.push(result.value); |
| 602 | } |
| 603 | } catch (error) { |
| 604 | this.#sourceError = wrapError(error); |
| 605 | this.#sourceExhausted = true; |
| 606 | } |
| 607 | } |
| 608 | |
| 609 | #tryTrimBuffer() { |
| 610 | if (this.#cachedMinCursorConsumers === 0) { |