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
Hi,
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.


View Tutorial



Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. I tried to create an object on my 6th code but i a
View Tutorial          By: AARON VICU√ĎA at 2009-03-24 05:20:24

2. It'z to hard to study a computer programming.but i
View Tutorial          By: christine idio at 2009-10-20 02:06:58

3. You know what will be usefull if we can use this
View Tutorial          By: mechkid at 2012-12-03 14:54:41

4. thank you....
I have a problem.
I my

View Tutorial          By: AbhiRules at 2010-08-05 20:55:27

5. #include<iostream>
#include<conio.

View Tutorial          By: Zohaib Farooq at 2011-05-23 12:47:54

6. The Given Programms are not suitable for "How
View Tutorial          By: Rams at 2009-01-27 01:36:16

7. Just used InstallCert.java successfully so that my
View Tutorial          By: Anthony Pelosi at 2009-12-30 15:52:17

8. it was so nice .................i can easily solve
View Tutorial          By: pravin at 2012-07-14 06:15:33

9. Please help .... I can't access this code. so any
View Tutorial          By: Sonu Kumar at 2014-02-26 11:31:08

10. the way of explanation is really good. there is a
View Tutorial          By: Arul at 2009-01-09 00:13:46