()
| 491 | } |
| 492 | |
| 493 | #resolvePendingWrites() { |
| 494 | while (this.#pendingWrites.length > 0 && |
| 495 | this.#slots.length < this.#highWaterMark) { |
| 496 | const pending = this.#pendingWrites.shift(); |
| 497 | this.#slots.push(pending.chunks); |
| 498 | for (let i = 0; i < pending.chunks.length; i++) { |
| 499 | this.#bytesWritten += TypedArrayPrototypeGetByteLength(pending.chunks[i]); |
| 500 | } |
| 501 | pending.resolve(); |
| 502 | } |
| 503 | |
| 504 | if (this.#slots.length < this.#highWaterMark) { |
| 505 | this.#resolvePendingDrains(true); |
| 506 | } |
| 507 | } |
| 508 | |
| 509 | #resolvePendingDrains(canWrite) { |
| 510 | const drains = this.#pendingDrains; |
no test coverage detected