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

Function pollWorkers

test/parallel/test-cluster-primary-error.js:94–99  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

92 // flaky – another process might end up being started right after the
93 // workers finished and receive the same PID.
94 const pollWorkers = () => {
95 // When primary is dead all workers should be dead too
96 if (workers.some((pid) => common.isAlive(pid))) {
97 setTimeout(pollWorkers, 50);
98 }
99 };
100
101 // Loop indefinitely until worker exit
102 pollWorkers();

Callers 1

Calls 2

someMethod · 0.80
setTimeoutFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…