|
Because probably the main thread calls the sendREP() method and sets ok = 1 and calls notify() before the thread t1 reaches the wait() call. Put a timeout on wait (wait(100)) and call wait in a loop, replace the if with a while.
__________________
Daniel @ [ To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. ]
Language is froth on the surface of thought
|