* Pops the head value from the ring buffer. If a sender is waiting, its * value is promoted into the freed slot.
()
| 707 | * value is promoted into the freed slot. |
| 708 | */ |
| 709 | #dequeue(): T { |
| 710 | const value = this.#buffer.popFront()!; |
| 711 | const sender = this.#nextSender(); |
| 712 | if (sender) { |
| 713 | this.#buffer.pushBack(sender.value); |
| 714 | sender.res(); |
| 715 | } |
| 716 | return value; |
| 717 | } |
| 718 | |
| 719 | #receiveError(): unknown { |
| 720 | if (this.#hasCloseReason) return this.#closeReason; |
no test coverage detected