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
Describe the bug
A promise returned by a Symbol.dispose method should not be awaited by AsyncDisposableStack.prototype.use
To Reproduce
Steps to reproduce the behavior:
import{AsyncDisposableStack}from"https://deno.land/x/dispose/mod.ts";{conststack=newAsyncDisposableStack();constneverResolves=Promise.withResolvers().promise;stack.use({[Symbol.dispose](){returnneverResolves}});awaitstack.disposeAsync();console.log('[1] does this line of code ever run?');}
Expected behavior
The console log should run. When I tried this polyfill with Deno 2.2.1 the console log statement never ran.
Describe the bug
A promise returned by a Symbol.dispose method should not be awaited by AsyncDisposableStack.prototype.use
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The console log should run. When I tried this polyfill with Deno 2.2.1 the console log statement never ran.
Additional context
tc39/proposal-explicit-resource-management#256
The text was updated successfully, but these errors were encountered: