但是对于某个变量的条件产生的模糊性是应该限制的。
But ambiguity need not be restricted to conditions of one variable.
不过,每个条件变量都应该伴有一个互斥。
还要注意,两个条件变量使用相同的互斥锁。
If you're not updating some variable by incrementing it or decrementing it -- if you're not changing anything, presumably the conditions are never going to evaluate to false or the opposite, so you're just going to have an infinite loop, which might be your goal, but odds are it's not.
如果你不通过增加或减少它来改变一些变量,-如果你不改变什么,大概那个条件永远不会变成错误的,或相反的,所以你将得到一个无限循环,那可能是你的目标,但可能也不是。
应用推荐