Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Threads Question

 
Ninad Kulkarni
Ranch Hand
Posts: 802
Hibernate Linux Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Ranchers

Please help me regrding this question

The question is from: Niko�s java blog:
http://nikojava.wordpress.com/2008/09/08/scjp-mock-exam-for-threads/

If Job thread is not started then program waits
but if Job thread started then without using notify
main thread comes out of wait state
why this happens?

Run the following code





Regards
Ninad
 
Henry Wong
author
Marshal
Pie
Posts: 20893
75
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See this post for an explanation of what you are encountering...

http://www.coderanch.com/t/234368/threads/java/wait-without-notify

Henry
 
Ninad Kulkarni
Ranch Hand
Posts: 802
Hibernate Linux Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello
Henry Wong

I clearly understand the concept

Regards
Ninad

[ September 16, 2008: Message edited by: Ninad Kulkarni ]
[ September 16, 2008: Message edited by: Ninad Kulkarni ]
 
Ninad Kulkarni
Ranch Hand
Posts: 802
Hibernate Linux Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks
Henry Wong

Regards
Ninad
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic