You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Should a promise returned by a Symbol.dispose method be awaited by AsyncDisposableStack#use / await using?
Put another way:
{conststack=newAsyncDisposableStack();constneverResolves=Promise.withResolvers().promise;stack.use({[Symbol.dispose](){returnneverResolves}});awaitstack.disposeAsync();console.log('[1] does this line of code ever run?');}
{{constneverResolves=Promise.withResolvers().promise;awaitusing_={[Symbol.dispose]: ()=>neverResolves};}console.log('[2] does this line of code ever run?');}