(iter)
| 19 | process.env.HAS_STARTED_WORKER = 1; |
| 20 | |
| 21 | function spinWorker(iter) { |
| 22 | const w = new Worker(__filename); |
| 23 | w.on('message', common.mustCall((msg) => { |
| 24 | assert.strictEqual(msg, 'terminate'); |
| 25 | w.terminate(); |
| 26 | })); |
| 27 | |
| 28 | w.on('exit', common.mustCall(() => { |
| 29 | if (iter < MAX_ITERATIONS) |
| 30 | spinWorker(++iter); |
| 31 | })); |
| 32 | } |
| 33 | |
| 34 | for (let i = 0; i < MAX_THREADS; i++) { |
| 35 | spinWorker(0); |
no test coverage detected