File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Threads and Synchronization and the fly likes threads concepts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "threads concepts" Watch "threads concepts" New topic
Author

threads concepts

nitiish chinnaraju
Greenhorn

Joined: Jan 16, 2014
Posts: 13



why the wait is not working?
Roger Sterling
Ranch Hand

Joined: Apr 06, 2012
Posts: 426

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
Bartender

Joined: Sep 06, 2012
Posts: 1000
    
  16
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

Joined: Oct 26, 2003
Posts: 412
    
    2

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).


"Eagles may soar but weasels don't get sucked into jet engines" SCJP 1.6, SCWCD 1.4, SCJD 1.5,SCBCD 5
 
Consider Paul's rocket mass heater.
 
subject: threads concepts
 
Similar Threads
How is it that some methods like paint( ) are called automatically?
Thread interrupt confusion
Synchronized
Constructor exception doubt
A question for All