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

[一入java深似海] stage3 lesson1 ThreadWaitAndNotifyDemo.java #15

Open
zhang852774731 opened this issue Apr 23, 2019 · 0 comments
Open

Comments

@zhang852774731
Copy link

ThreadWaitAndNotifyDemo.java,这个文件演示了wait和notify方法的使用,但是这里有个不严谨的地方,假如main线程先获取到锁,然后执行了notifyAll方法,t1和t2线程之后调用wait方法进入等待状态,这种情况下,t1和t2会一直处于等待状态

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