Otherwise, the thread blocks until the mutex clears.
否则,线程将阻止,直到清除互斥体。
This blocks the main thread but executes the code on another thread.
这阻塞了主线程但是在另一个线程上执行代码。
Instead of throwing an exception when the queue is empty, the reader thread now blocks itself on the condition variable.
当队列是空的时候,读线程现在并不抛出异常,而是在条件变量上阻塞自身。
应用推荐