However, a mutex should accompany each condition variable.
不过,每个条件变量都应该伴有一个互斥。
In some implementations, threads may occasionally wake up without a signal sent to their condition variable.
在有些实现中,线程可能偶尔在没有信号送到条件变量的情况下醒过来。
A condition variable enables developers to implement a condition in which a thread executes and then blocked.
条件变量让开发者能够实现一个条件,在这个条件下线程执行然后被阻塞。
应用推荐