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. How to draw a thick circle in midlet?
View Tutorial          By: masi at 2011-12-01 11:47:00

2. I want to use concept of overriding and i want to
View Tutorial          By: Aniket at 2013-06-20 10:23:10

3. pl send me how to download java 2 micro edition do
View Tutorial          By: Narayana at 2013-02-21 10:08:27

4. Nice info. I must say about this post.
than

View Tutorial          By: Ganesh Prasad at 2012-10-30 05:51:49

5. Class TypeCasting
{
public static v

View Tutorial          By: kishoree koli at 2013-03-14 03:00:31

6. Useful info
View Tutorial          By: valli at 2014-10-27 10:56:58

7. This program is faulty .

Check for

View Tutorial          By: Shrikant Kale at 2014-09-09 07:31:04

8. these is the error when i run these program

View Tutorial          By: chintan rajpara at 2015-01-05 06:46:25

9. Very useful. Just a small comment on the line:

View Tutorial          By: Litty Joseph at 2008-02-06 08:37:52

10. Really very nice and step by step explanation hel
View Tutorial          By: sabarish at 2011-11-08 06:47:49