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

Function waitForMessage

test/parallel/test-worker-debug.js:16–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14const workerMessage = 'This is a message from a worker';
15
16function waitForMessage() {
17 return new Promise((resolve) => {
18 parentPort.once('message', resolve);
19 });
20}
21
22// This is at the top so line numbers change less often
23if (!isMainThread) {

Callers 1

Calls 1

onceMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…