MCPcopy
hub / github.com/nodejs/undici / push

Method push

lib/dispatcher/fixed-queue.js:115–122  ·  view source on GitHub ↗

@param {T} data

(data)

Source from the content-addressed store, hash-verified

113
114 /** @param {T} data */
115 push (data) {
116 if (this.head.isFull()) {
117 // Head is full: Creates a new queue, sets the old queue's `.next` to it,
118 // and sets it as the new main queue.
119 this.head = this.head.next = new FixedCircularBuffer()
120 }
121 this.head.push(data)
122 }
123
124 /** @returns {T|null} */
125 shift () {

Callers 15

closeMethod · 0.45
destroyMethod · 0.45
#parseNoProxyMethod · 0.45
[kClose]Method · 0.45
[kDestroy]Method · 0.45
onHeaderFieldMethod · 0.45
onHeaderValueMethod · 0.45
writeH1Function · 0.45
[kOnDrain]Method · 0.45
[kClose]Method · 0.45
[kDispatch]Method · 0.45
[kAddClient]Method · 0.45

Calls 1

isFullMethod · 0.45

Tested by

no test coverage detected