()
| 449 | // =========================================================================== |
| 450 | |
| 451 | #drain() { |
| 452 | if (this.#slots.length === 1) { |
| 453 | return this.#slots.shift(); |
| 454 | } |
| 455 | |
| 456 | const result = []; |
| 457 | for (let i = 0; i < this.#slots.length; i++) { |
| 458 | const slot = this.#slots.get(i); |
| 459 | for (let j = 0; j < slot.length; j++) { |
| 460 | ArrayPrototypePush(result, slot[j]); |
| 461 | } |
| 462 | } |
| 463 | this.#slots.clear(); |
| 464 | return result; |
| 465 | } |
| 466 | |
| 467 | #resolvePendingReads() { |
| 468 | while (this.#pendingReads.length > 0) { |
no test coverage detected