Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

threads concepts

 
nitiish chinnaraju
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



why the wait is not working?
 
Roger Sterling
Ranch Hand
Posts: 426
Eclipse IDE Fedora Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We need two things : 1. put your code in [c ode] tags and 2. Please ask a specific question in the context of what you tried to do to fix your issue.
 
Chan Ag
Rancher
Posts: 1089
14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Roger is right. Please UseCodeTags while posting code ( of any length ).
I've added them.to your post this time.

Also please note that ItDoesntWorkIsUseless
So please ask specific questions, as that increases your chances
of getting a help here.
 
Chris Hurst
Ranch Hand
Posts: 443
3
C++ Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your wait needs to be in a synchronized block of some form ;-) or you'll get a nasty run time error ;-)

After that you'll need a notify in another thread if you want your wait to wake up (or a time limit on the wait itself).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic