There was an error while loading. Please reload this page.
1 parent 170b183 commit 9e53fafCopy full SHA for 9e53faf
test/parallel/test-worker-dispose.mjs
@@ -0,0 +1,10 @@
1
+import * as common from '../common/index.mjs';
2
+import { Worker } from 'node:worker_threads';
3
+
4
+let w;
5
+{
6
+ // Verifies that the worker is async disposable
7
+ await using worker = new Worker('for(;;) {}', { eval: true });
8
+ w = worker;
9
+ w.on('exit', common.mustCall());
10
+}
0 commit comments