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

This method generates a new lock each time it steps into. What does this lock do? 这个方法每次进来都是一把新的lock, 这个加锁起到了什么作用? #1

Open
jiahut opened this issue Apr 17, 2022 · 0 comments

Comments

@jiahut
Copy link

jiahut commented Apr 17, 2022

ReentrantLock lock = new ReentrantLock();

@jiahut jiahut changed the title 这个方法每次进来都是一把新的lock, 这个加锁起到了什么作用? This method generates a new lock each time it steps into. What does this lock do? 这个方法每次进来都是一把新的lock, 这个加锁起到了什么作用? Apr 17, 2022
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