Skip to content

Commit 761bb60

Browse files
committed
fixup
1 parent 6142adc commit 761bb60

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/parallel/test-worker-nearheaplimit-deadlock.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
'use strict';
22
const common = require('../common');
33
const assert = require('assert');
4-
const { isMainThread, Worker } = require('worker_threads');
4+
const { Worker } = require('worker_threads');
55

6-
if (isMainThread) {
6+
// Do not use isMainThread so that this test itself can be run inside a Worker.
7+
if (!process.env.HAS_STARTED_WORKER) {
8+
process.env.HAS_STARTED_WORKER = 1;
79
const opts = {
810
resourceLimits: {
911
maxYoungGenerationSizeMb: 0,

0 commit comments

Comments
 (0)