Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add PromiseCapability wrapper around sync dispose used in an await using #218

Merged
merged 2 commits into from
Apr 10, 2024

Conversation

rbuckton
Copy link
Collaborator

Per discussion in #216 (comment), this adds a PromiseCapability to the wrapper function created around a @@dispose method read by an await using declaration to ensure that any errors thrown by @@dispose are not thrown synchronously. This is in keeping with the mechanism used in %AsyncFromSyncIteratorPrototype%.next().

@rbuckton rbuckton added needs-consensus A pull request that needs consensus at TC39 plenary normative Indicates a normative change to the specification labels Mar 22, 2024
Copy link

A preview of this PR can be found at https://tc39.es/proposal-explicit-resource-management/pr/218.

Copy link

@syg syg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Editorially lgtm.

@rbuckton rbuckton added the has-consensus Indicates a pull request reached consensus at TC39 plenary. label Apr 10, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working has-consensus Indicates a pull request reached consensus at TC39 plenary. needs-consensus A pull request that needs consensus at TC39 plenary normative Indicates a normative change to the specification
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants