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

Unnecessary synchronised lock #610

Open
cdluv opened this issue Jun 18, 2018 · 0 comments
Open

Unnecessary synchronised lock #610

cdluv opened this issue Jun 18, 2018 · 0 comments

Comments

@cdluv
Copy link

cdluv commented Jun 18, 2018

I was just passing through...

Using a guard object helps, but perhaps having a look here may make the code simpler:
https://docs.oracle.com/javase/tutorial/essential/concurrency/locksync.html

I'd go for making methods synchronised, then all that locking stuff goes away and makes the code easier to understand.

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

No branches or pull requests

1 participant