Skip to content
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

<semaphore>: Add missed mandates for counting_semaphore #3747

Merged
merged 3 commits into from
Jun 15, 2023

Conversation

frederick-vs-ja
Copy link
Contributor

See [thread.sema.cnt]/2.

Also change the precondition check for release into the form in standard wording ([thread.sema.cnt]/8).

Also make the internal function _Wait private.

Fixes #3746. Thank you @achabense!

Also change the precondition check for `release` into the form in standard wording.

Also make the internal function `_Wait` private.
@frederick-vs-ja frederick-vs-ja requested a review from a team as a code owner June 5, 2023 16:49
@frederick-vs-ja frederick-vs-ja changed the title <sema>Add missed mandates for counting_semaphore <semaphore>: Add missed mandates for counting_semaphore Jun 5, 2023
@CaseyCarter CaseyCarter added the enhancement Something can be improved label Jun 5, 2023
stl/inc/semaphore Outdated Show resolved Hide resolved
@StephanTLavavej StephanTLavavej added bug Something isn't working and removed enhancement Something can be improved labels Jun 7, 2023
@StephanTLavavej StephanTLavavej self-assigned this Jun 7, 2023
Also avoid `static_cast`ing `_Update` to `ptrdiff_t` because the type of `_Update` is already `ptrdiff_t`.
@StephanTLavavej StephanTLavavej removed their assignment Jun 8, 2023
@StephanTLavavej StephanTLavavej self-assigned this Jun 14, 2023
@StephanTLavavej
Copy link
Member

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

@StephanTLavavej StephanTLavavej merged commit 881e13e into microsoft:main Jun 15, 2023
35 checks passed
@StephanTLavavej
Copy link
Member

Thanks for fixing this bug and improving the STL's detection of misuse! 🐞 🎉 😺

@frederick-vs-ja frederick-vs-ja deleted the fix-semaphore branch June 15, 2023 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improvements to std::counting_semaphore
6 participants