Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@frederick-vs-ja
Copy link
Contributor

This PR changes _RERAISE in <mutex> to scope guards (towards #2307).
And strengthens exception specifications for

And exception specification strengthening.
@frederick-vs-ja frederick-vs-ja requested a review from a team as a code owner January 2, 2023 15:11
@CaseyCarter CaseyCarter added the enhancement Something can be improved label Jan 2, 2023
Copy link
Contributor

@strega-nil-ms strega-nil-ms left a comment

Choose a reason for hiding this comment

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

Thanks so much!

Copy link
Contributor

@CaseyCarter CaseyCarter left a comment

Choose a reason for hiding this comment

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

I lied: found something to change =)

CaseyCarter and others added 2 commits January 4, 2023 10:52
_RERAISE;
_CATCH_END

_Guard._Valid = false;
Copy link
Member

Choose a reason for hiding this comment

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

No change requested: This is a perfectly cromulent name. However, it looks a little strange to say "this guard is invalid now", which sounds bad, but it's actually for the successful path. I would have recommended naming this _Active, as this would then read "this guard is inactive now", with more neutral connotations.

@StephanTLavavej
Copy link
Member

Thanks, these transformations look exactly correct, and bring us one step closer to the goal of eliminating unnecessary _RERAISE! 😻

FYI @CaseyCarter @strega-nil-ms I added a couple of _NODISCARDs after you approved.

@StephanTLavavej StephanTLavavej self-assigned this Jan 11, 2023
@StephanTLavavej
Copy link
Member

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej StephanTLavavej merged commit 8b5a11f into microsoft:main Jan 12, 2023
@StephanTLavavej
Copy link
Member

Thanks again for these nontrivial changes, improving debug codegen and debuggability! ✅ 😸 🎉

@frederick-vs-ja frederick-vs-ja deleted the mutex-guards-noexcept branch January 12, 2023 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Something can be improved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants