Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sync: Fail with init semaphore count < 0
Semaphores are not currently designed to handle this case correctly, leading to very strange behavior. Semaphores as written are intended to count *resources* and it's not possible to have a negative number of resources. This alters the behavior and documentation to note that the task will be failed if the initial count is 0. Closes #15758
- Loading branch information
3419e20
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.
saw approval from bblum
at alexcrichton@3419e20
3419e20
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.
merging alexcrichton/rust/issue-15758 = 3419e20 into auto
3419e20
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.
alexcrichton/rust/issue-15758 = 3419e20 merged ok, testing candidate = 221c28a
3419e20
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.
all tests pass:
success: http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/486
success: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/486
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-c/builds/485
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/486
success: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/487
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/488
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/487
success: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/493
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-c/builds/488
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/487
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/490
success: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/488
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/488
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-c/builds/489
3419e20
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.
fast-forwarding master to auto = 221c28a