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

Fixing held locks #1697

Merged
merged 3 commits into from Jul 31, 2015
Merged

Fixing held locks #1697

merged 3 commits into from Jul 31, 2015

Conversation

hkaiser
Copy link
Member

@hkaiser hkaiser commented Jul 31, 2015

This should fix the current locking problems.

@K-ballo could you please review the changes?

@@ -300,8 +301,11 @@ namespace detail
wait(ec);
if (ec) return NULL;

boost::unique_lock<mutex_type> l(mtx_);
Copy link
Member

Choose a reason for hiding this comment

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

This lock is unnecessary. Once a future has been made ready, which is a postcondition of wait, either:

  • there is only one writer (future), or
  • there are multiple readers only (shared_future, lock hurts concurrency)

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, let's remove it again. I was not sure...

hkaiser added a commit that referenced this pull request Jul 31, 2015
@hkaiser hkaiser merged commit 9fba5f5 into master Jul 31, 2015
@hkaiser hkaiser deleted the fixing_held_locks branch July 31, 2015 18:11
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