-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
Open
Labels
async_hooksIssues and PRs related to the async hooks subsystem.Issues and PRs related to the async hooks subsystem.async_local_storageAsyncLocalStorageAsyncLocalStorageconfirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.
Description
tested on v17 but i don't suspect that matters much.
'use strict';
const { AsyncLocalStorage } = require('async_hooks');
const s = new AsyncLocalStorage();
async function normal() {
console.log('async fn', s.getStore());
}
async function* gen() {
console.log('async gen', s.getStore());
}
s.run('hello', normal);
s.run('hello', gen).next();
output:
async fn hello
async gen undefined
/cc @nodejs/async_hooks
i'm assuming this probably will need some sort of effort on the v8 side?
benjamingr, cgerikj, ebekebe, ralbertazzi, himself65 and 2 more
Metadata
Metadata
Assignees
Labels
async_hooksIssues and PRs related to the async hooks subsystem.Issues and PRs related to the async hooks subsystem.async_local_storageAsyncLocalStorageAsyncLocalStorageconfirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.