• Post Reply Bookmark Topic Watch Topic
  • New Topic

Threads Question  RSS feed

 
Ninad Kulkarni
Ranch Hand
Posts: 802
Java Linux
  • 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
Sheriff
Posts: 23284
125
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
Java Linux
  • 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
Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks
Henry Wong

Regards
Ninad
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!