Comment on Tutorial - wait(), notify() and notifyAll() in Java - A tutorial By Jagan



Comment Added by : ron

Comment Added at : 2010-03-30 01:37:12

Comment on Tutorial : wait(), notify() and notifyAll() in Java - A tutorial By Jagan
Really a great article!
I have some questions/suggestions:
Shouldn't be the wait-calls be inside a loop to account for spurious wakeups? (see http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait())
Also, I would put the rest of the code after the wait() also into the try-block, because i wouldn't want it to be executed after an InterruptedException.


View Tutorial



Ask a Question

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. thank u sir ,this helped a lot
************

View Tutorial          By: yugandharr at 2012-09-11 15:47:19

2. Nice Example.Good work.keep it up.
Thanks,<

View Tutorial          By: Lucky at 2011-07-08 10:36:38

3. Actually, looking at the code, it looks as somethi
View Tutorial          By: Johnson at 2009-07-28 08:14:38

4. Hello,
I've tried the above code, but I've

View Tutorial          By: Phyo Phyo at 2009-09-14 05:32:28

5. When i run the program,Iam getting this

View Tutorial          By: anitha at 2008-12-17 21:37:36

6. how to calculate total value more item
View Tutorial          By: balaji at 2011-01-06 23:52:50

7. thanx it was really helpful
View Tutorial          By: Vidisha at 2010-07-09 06:21:32

8. sir there is no startapp(),destroyapp() and pause
View Tutorial          By: Sathish at 2012-08-20 08:49:33

9. i want to SCJP exam ,tell how to apply for this ex
View Tutorial          By: PRABAKARAN at 2013-07-16 13:32:50

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