summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/async_hooks.ts
diff options
context:
space:
mode:
Diffstat (limited to 'ext/node/polyfills/async_hooks.ts')
-rw-r--r--ext/node/polyfills/async_hooks.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/node/polyfills/async_hooks.ts b/ext/node/polyfills/async_hooks.ts
index e69bc88aa..d60334346 100644
--- a/ext/node/polyfills/async_hooks.ts
+++ b/ext/node/polyfills/async_hooks.ts
@@ -308,6 +308,14 @@ export class AsyncLocalStorage {
const currentFrame = AsyncContextFrame.current();
return currentFrame.get(this.#key);
}
+
+ enterWith(store: unknown) {
+ const frame = AsyncContextFrame.create(
+ null,
+ new StorageEntry(this.#key, store),
+ );
+ Scope.enter(frame);
+ }
}
export function executionAsyncId() {