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

Function broadcast

benchmark/worker/echo.js:49–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

47 }
48
49 function broadcast() {
50 if (broadcasts++ === n) {
51 bench.end(n);
52 for (const worker of workerObjs) {
53 worker.unref();
54 }
55 return;
56 }
57 for (const worker of workerObjs) {
58 for (let i = 0; i < sends; ++i)
59 worker.postMessage(payload);
60 }
61 }
62
63 function onMessage() {
64 if (++msgCount === expectedPerBroadcast) {

Callers 15

onOnlineFunction · 0.70
onMessageFunction · 0.70
runFunction · 0.50
testAbortSignalFunction · 0.50
testAlreadyAbortedSignalFunction · 0.50
testBroadcastWriteAbortFunction · 0.50
testRingbufferGrowFunction · 0.50
testDrainableAfterCloseFunction · 0.50
testDropOldestFunction · 0.50
testDropNewestFunction · 0.50

Calls 3

endMethod · 0.45
unrefMethod · 0.45
postMessageMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…