File tree 2 files changed +4
-5
lines changed 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ const {
19
19
String,
20
20
StringPrototypeTrim,
21
21
Symbol,
22
- SymbolAsyncDispose,
23
22
SymbolFor,
24
23
TypedArrayPrototypeFill,
25
24
Uint32Array,
@@ -60,7 +59,7 @@ const {
60
59
const { createMainThreadPort, destroyMainThreadPort } = require ( 'internal/worker/messaging' ) ;
61
60
const { deserializeError } = require ( 'internal/error_serdes' ) ;
62
61
const { fileURLToPath, isURL, pathToFileURL } = require ( 'internal/url' ) ;
63
- const { kEmptyObject } = require ( 'internal/util' ) ;
62
+ const { kEmptyObject, SymbolAsyncDispose } = require ( 'internal/util' ) ;
64
63
const { validateArray, validateString } = require ( 'internal/validators' ) ;
65
64
const {
66
65
throwIfBuildingSnapshot,
Original file line number Diff line number Diff line change 1
1
import * as common from '../common/index.mjs' ;
2
2
import { Worker } from 'node:worker_threads' ;
3
3
4
- // Verifies that the worker is async disposable
5
- await using worker = new Worker ( 'for(;;) {}' , { eval : true } ) ;
4
+ // Verifies that the worker is async disposable.
5
+ const worker = new Worker ( 'for(;;) {}' , { eval : true } ) ;
6
6
worker . on ( 'exit' , common . mustCall ( ) ) ;
7
- worker [ Symbol . dispose ] ( ) ;
7
+ await worker [ Symbol . asyncDispose ] ( ) ;
You can’t perform that action at this time.
0 commit comments