mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
10 lines
136 B
JavaScript
10 lines
136 B
JavaScript
|
const {
|
||
|
Worker,
|
||
|
workerData,
|
||
|
threadId
|
||
|
} = require('worker_threads');
|
||
|
|
||
|
if (threadId < 2) {
|
||
|
new Worker('1 + 1', { eval: true });
|
||
|
}
|