Comment on Tutorial - wait(), notify() and notifyAll() in Java - A tutorial By Jagan
Comment Added by : Pranay
Comment Added at : 2012-09-19 19:08:45
Comment on Tutorial : wait(), notify() and notifyAll() in Java - A tutorial By Jagan
Even if the while loops (in Producer and Consumer's run method ) in 27's code is made limited to a certain cycle then also 27's code could result into a thread (any one of producer or consumer) waiting indefinitely or for a long time.
This would happen as notify() is not present before returns from put() and get() methods. So there are chances when one of the thread could lead to a forever waiting state.
- Data Science
- Cloud Computing
- Java Beans
- Mac OS X
- Office 365
- Tech Reviews
Subscribe to Tutorials
2. Session Bean = client data is maintained upto pred
View Tutorial By: Chetankumar at 2012-05-19 11:12:17
6. is anyone going to post the complete version of th
View Tutorial By: anon at 2009-04-21 12:26:51
7. Nice example. I think this is more idiomatic tho'.
View Tutorial By: John Morrison at 2010-03-28 14:55:07