-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set state of enumerator object to "after" during disposal #76090
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (commit 13)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will @BillWagner need to do any manual work to get this published, since it's a new doc? Or will it flow automatically?
The breaking change was approved in email. I'll go ahead and merge. |
Fixes #76078 (scenarios where resuming iteration after disposal can continue executing user code).
This change is pending on approval for breaking change. This behavior exists as far back as the native compiler.
Note: there are more scenarios left where we don't properly set the state to "after", but the impact is much less impactful. Filed follow-up issue #76089 (scenarios where iterating a second time will allocate a new enumerator instance).