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

Fix sliding_semaphore test #3199

Merged
merged 1 commit into from Feb 27, 2018
Merged

Fix sliding_semaphore test #3199

merged 1 commit into from Feb 27, 2018

Conversation

msimberg
Copy link
Contributor

@msimberg msimberg commented Feb 26, 2018

The test fails if sem.signal(10) happens to run before at least one sem.signal(x) with x < 10 (can happen because apply does not guarantee ordering).

This fixes it by using the atomic count as the argument to sem.signal.

Copy link
Member

@hkaiser hkaiser left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@msimberg msimberg merged commit 8c0d176 into master Feb 27, 2018
@msimberg msimberg deleted the msimberg-patch-2 branch February 27, 2018 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants