MCPcopy Create free account
hub / github.com/ampproject/amphtml / dequeue

Method dequeue

src/core/data-structures/priority-queue.js:87–93  ·  view source on GitHub ↗

* Dequeues the max priority item. * Items with the same priority are dequeued in FIFO order. * @return {?T}

()

Source from the content-addressed store, hash-verified

85 * @return {?T}
86 */
87 dequeue() {
88 const lastItem = this.queue_.pop();
89 if (!lastItem) {
90 return null;
91 }
92 return lastItem.item;
93 }
94
95 /**
96 * The number of items in the queue.

Callers

nothing calls this directly

Calls 1

popMethod · 0.45

Tested by

no test coverage detected