in reply to Re^8: baton passing threads and cond_signal
in thread baton passing threads and cond_signal
There's no persistant lock. cond_wait releases the lock, allowing other threads to cond_broadcast. cond_wait re-obtains the lock on awakening.
You should reread my node. I added this critical paragraph:
The problem might be that your system's implementation of cond_wait isn't atomic (while it should be), allowing a signal to come in after cond_wait unlocks $baton, but before cond_wait starts waiting.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^10: baton passing threads and cond_signal
by Anonymous Monk on Aug 22, 2007 at 16:47 UTC | |
by BrowserUk (Patriarch) on Aug 22, 2007 at 19:00 UTC | |
by ikegami (Patriarch) on Aug 22, 2007 at 19:32 UTC | |
by BrowserUk (Patriarch) on Aug 22, 2007 at 19:46 UTC | |
by Joost (Canon) on Aug 23, 2007 at 21:07 UTC | |
|