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

Infinite loop in mutex dtor when backend is unavailable #2

Closed
wants to merge 3 commits into from

Conversation

NoiseByNorthwest
Copy link
Contributor

There is another issue (infinite loop) with the mutex destructor. It occurs when the lock backend service is unavailable at release time. The loop in destructor should take in account the releaseLock()'s return value (ie release status) and stop its processing in case of release failure. I have chosen to throw an exception in this case.
There is also a consistency break between "counter" and "acquired" bit which always means counter == 0 so I have removed this one.
This patch is splitted into 2 commits. The first is the unit test which proves the failure (no throw) when the backend is unavailable and the second is the fix.

@arvenil arvenil closed this Jul 9, 2014
@arvenil
Copy link
Owner

arvenil commented Jul 9, 2014

Thanks for this @NoiseByNorthwest !
But could you please send pull request against master branch?

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