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

Function queuePending

lib/internal/perf/observe.js:117–127  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

115let isPending = false;
116
117function queuePending() {
118 if (isPending) return;
119 isPending = true;
120 setImmediate(() => {
121 isPending = false;
122 const pendings = ArrayFrom(kPending.values());
123 kPending.clear();
124 for (const pending of pendings)
125 pending[kDispatch]();
126 });
127}
128
129function getObserverType(type) {
130 switch (type) {

Callers 2

observeMethod · 0.85
[kMaybeBuffer]Method · 0.85

Calls 3

clearMethod · 0.65
setImmediateFunction · 0.50
valuesMethod · 0.45

Tested by

no test coverage detected