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

#595 - Fix concurrency issue on log wait. #596

Closed
wants to merge 1 commit into from

Conversation

swen-fuhrmann
Copy link

Removed the synchronized because the check() method will always performed by the same thread. The member detected was only partly covered by the original synchronized because it was written in an anonymous inner class (LogCallback) which was not part of the synchronized block.
This fix mark the detected flag as volatile to ensure that a write by an other thread calling the log callback will be propagate to the thread who calls the check() method.

@rhuss
Copy link
Collaborator

rhuss commented Oct 19, 2016

Thanks a lot. I'm currently on the road but will be back soon. Will check out the PR ASAP.

@rhuss
Copy link
Collaborator

rhuss commented Oct 22, 2016

You are absolutely correct, detected needs to be volatile. Thanks for spotting this, the PR will be included in the next release.

@rhuss rhuss added the applied label Oct 22, 2016
@rhuss
Copy link
Collaborator

rhuss commented Oct 24, 2016

0.16.9 is out with fix applied

@rhuss rhuss closed this Oct 24, 2016
@swen-fuhrmann
Copy link
Author

Fantastic - thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants