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. Please, send me a working JSP version ,i got error
View Tutorial          By: Pang at 2008-01-11 00:01:52

2. Thks a lot..... The way of giving explanation and
View Tutorial          By: Hari at 2011-04-08 02:58:06

3. Hi, this blog answers my questions but what is the
View Tutorial          By: Edu at 2009-09-20 00:19:27

4. i am looking for c programs in written
View Tutorial          By: ziyauddin at 2011-02-13 06:21:09

5. Nearly perfect help, but the path I had to use was
View Tutorial          By: Martin Zeltner at 2009-09-15 04:15:19

6. Hi,
I am using Nokia 3110c connected to PC.

View Tutorial          By: Satish Raj at 2009-04-04 07:32:54

7. easy.......
View Tutorial          By: Suman at 2011-07-20 07:04:28

8. gudeveniing!! plz gave me some project title gor j
View Tutorial          By: ivie at 2012-12-12 11:00:43

9. very easy and simple program..
need minor

View Tutorial          By: Metal at 2014-05-07 10:31:04

10. i want to how to run a package and compile also
View Tutorial          By: sandhya at 2015-06-25 09:04:03