MCPcopy Index your code
hub / github.com/nodejs/node / shift

Method shift

lib/internal/fixed_queue.js:111–126  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

109 }
110
111 shift() {
112 const tail = this.tail;
113 const next = tail.shift();
114 if (tail.isEmpty() && tail.next !== null) {
115 // If there is another queue, it forms the new tail.
116 this.tail = tail.next;
117 tail.next = null;
118 tail.bottom = 0;
119 tail.top = 0;
120
121 if (FixedQueue.#pool.length < 64) {
122 FixedQueue.#pool.push(tail); // Recycle old tail
123 }
124 }
125 return next;
126 }
127};

Callers 13

url.jsFile · 0.45
AgentFunction · 0.45
_http_agent.jsFile · 0.45
events.jsFile · 0.45
nextFunction · 0.45
eventHandlerFunction · 0.45
errorHandlerFunction · 0.45
closeHandlerFunction · 0.45
abortIncomingFunction · 0.45
abortOutgoingFunction · 0.45
resOnFinishFunction · 0.45
listOnTimeoutFunction · 0.45

Calls 2

isEmptyMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected