View Single Post
  #2 (permalink)  
Old 04-23-2008, 07:16 PM
danielstoner's Avatar
danielstoner danielstoner is offline
Senior Member
 
Join Date: Apr 2008
Location: Canada
Posts: 183
danielstoner is on a distinguished road
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
Reply With Quote