The break condition can be defined for the wait in the until function, or extend the wait class to implement.
可以在until函数中定义等待的退出条件,或者扩展wait类来实现等待退出。
2
The best way to do this is to use the pthread_cond_wait call to wait on a particular condition to become true.
解决这个问题的最佳方法是使用pthread_cond_wait调用来等待特殊条件发生。
3
Next, the reader thread needs to ensure (and this is the second check you perform) that it does not wait on the condition variable any more than the specified timeout period.