()
| 53 | } |
| 54 | |
| 55 | function runChildWorkerThread() { |
| 56 | let worker = null; |
| 57 | parentPort.on('message', ({ child, depth, done }) => { |
| 58 | if (done) { |
| 59 | if (worker) { |
| 60 | worker.postMessage({ done: true }); |
| 61 | } |
| 62 | parentPort.close(); |
| 63 | } else if (depth) { |
| 64 | parentPort.postMessage({ child: depth }); |
| 65 | if (depth < MAX_DEPTH) { |
| 66 | worker = startWorker(depth + 1, workerCallback); |
| 67 | } |
| 68 | } else if (child) { |
| 69 | parentPort.postMessage({ child }); |
| 70 | } |
| 71 | }); |
| 72 | } |
| 73 | |
| 74 | if (isMainThread) { |
| 75 | runMainThread(); |
no test coverage detected
searching dependent graphs…