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

Function waitForWorkerDetach

test/parallel/test-worker-debug.js:54–61  ·  view source on GitHub ↗
(session, id)

Source from the content-addressed store, hash-verified

52}
53
54async function waitForWorkerDetach(session, id) {
55 let sessionId;
56 do {
57 const { params } =
58 await waitForEvent(session, 'NodeWorker.detachedFromWorker');
59 sessionId = params.sessionId;
60 } while (sessionId !== id);
61}
62
63function runWorker(id, workerCallback = () => {}) {
64 return new Promise((resolve, reject) => {

Callers 1

testBasicWorkerDebugFunction · 0.85

Calls 1

waitForEventFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…