Re: Waiting for a condition
Monday, March 10, 2003 01:47 AM
You can use an object as a basis for your synchronization. In thread 1 (the one that waits until available is true), just at the beginning of its method run, add myObject.wait () (my object an simple instance of object). Then when you change the value of available to true, wake up the first thread by calling myObject.notify() ....