The signal can't be missed as long as cond_signal($c) and the cond_wait($c) while !desired_condition(); are only called when you have the lock. That's why it works for your code. That's why it works for my code. There's a bug in your OS (or emulation) otherwise.
(Stopped test after it produced 6,951,816 lines and 110,673,920 bytes of output)
In reply to Re^8: Threads sharing global variable (disingenous)
by ikegami
in thread Threads sharing global variable
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |