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

Skip to content

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
@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
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
@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