MCPcopy Create free account
hub / github.com/nodejs/node / shift

Method shift

deps/undici/src/lib/dispatcher/fixed-queue.js:125–134  ·  view source on GitHub ↗

@returns {T|null}

()

Source from the content-addressed store, hash-verified

123
124 /** @returns {T|null} */
125 shift () {
126 const tail = this.tail
127 const next = tail.shift()
128 if (tail.isEmpty() && tail.next !== null) {
129 // If there is another queue, it forms the new tail.
130 this.tail = tail.next
131 tail.next = null
132 }
133 return next
134 }
135}

Callers 7

[kOnDrain]Method · 0.45
[kDestroy]Method · 0.45
consumeMethod · 0.45
consumeFragmentsMethod · 0.45
#runMethod · 0.45
dropConsumedChunksMethod · 0.45
#flushWaitingHandlerMethod · 0.45

Calls 1

isEmptyMethod · 0.45

Tested by

no test coverage detected