1'use strict'; 2require('../common'); 3const assert = require('assert'); 4const { Worker } = require('worker_threads'); 5const constrainedMemory = process.constrainedMemory(); 6if (constrainedMemory !== undefined) { 7 assert(constrainedMemory > 0); 8} 9if (!process.env.isWorker) { 10 process.env.isWorker = true; 11 new Worker(__filename); 12} 13