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 shared_mutex and future time jump tests #179

Conversation

austin-beer
Copy link
Contributor

This PR is composed of two commits.

The first commit simply reverts pthread/shared_mutex.hpp and future.hpp back to the versions in develop, which reverts all of the changes we've made to these two files to date.

The second commit re-fixes the time jump issues by using the predicate versions of the wait functions, which is a simpler solution than the one we were using before and which works even with the changes we made to avoid losing notifications.

… in the develop branch. This discarded all changes made to these two files in the feature/timespec_clocks branch to date.
- This allowed these classes to take advantage of the time jump fixes in condition_variable.
Fixed a minor issue where, if a thread was waiting after calling one of the following functions and it timed out at the same time it was given the lock, it would return false (failure) rather than succeeding.
- mutex::timed_lock()
- mutex::try_lock_for()
- mutex::try_lock_until()
- recursive_mutex::timed_lock()
- recursive_mutex::try_lock_for()
- recursive_mutex::try_lock_until()
- shared_mutex::timed_lock_shared()
- shared_mutex::try_lock_shared_for()
- shared_mutex::try_lock_shared_until()
@viboes
Copy link
Collaborator

viboes commented Oct 13, 2017

Thanks a lot for almost fixing everything.
There is some hope we could have this for boost-1.66.

@viboes viboes merged commit 48ceff1 into boostorg:feature/timespec_clocks Oct 14, 2017
@austin-beer austin-beer deleted the feature/timespec_clocks_pr18_use_pred_overloads branch October 15, 2017 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants