blob: 01e95ead8316cb8107d15e846e9b95aee9ec7db3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
'use strict';
const common = require('../common');
const assert = require('assert');
const {
Worker,
threadId: parentThreadId,
} = require('worker_threads');
process.on('worker', common.mustCall(({ threadId }) => {
assert.strictEqual(threadId, parentThreadId + 1);
}));
new Worker('', { eval: true });
|