File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ const {
1919 String,
2020 StringPrototypeTrim,
2121 Symbol,
22- SymbolAsyncDispose,
2322 SymbolFor,
2423 TypedArrayPrototypeFill,
2524 Uint32Array,
@@ -60,7 +59,7 @@ const {
6059const { createMainThreadPort, destroyMainThreadPort } = require ( 'internal/worker/messaging' ) ;
6160const { deserializeError } = require ( 'internal/error_serdes' ) ;
6261const { fileURLToPath, isURL, pathToFileURL } = require ( 'internal/url' ) ;
63- const { kEmptyObject } = require ( 'internal/util' ) ;
62+ const { kEmptyObject, SymbolAsyncDispose } = require ( 'internal/util' ) ;
6463const { validateArray, validateString } = require ( 'internal/validators' ) ;
6564const {
6665 throwIfBuildingSnapshot,
Original file line number Diff line number Diff line change 11import * as common from '../common/index.mjs' ;
22import { Worker } from 'node:worker_threads' ;
33
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 } ) ;
66worker . 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