Open
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?