MCPcopy Create free account
hub / github.com/denoland/std / #dequeue

Method #dequeue

async/channel.ts:709–717  ·  view source on GitHub ↗

* Pops the head value from the ring buffer. If a sender is waiting, its * value is promoted into the freed slot.

()

Source from the content-addressed store, hash-verified

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;

Callers 2

receiveMethod · 0.95
tryReceiveMethod · 0.95

Calls 3

#nextSenderMethod · 0.95
popFrontMethod · 0.80
pushBackMethod · 0.80

Tested by

no test coverage detected