Instead of throwing an exception when the queue is empty, the reader thread now blocks itself on the condition variable.
当队列是空的时候,读线程现在并不抛出异常,而是在条件变量上阻塞自身。
2
For example, you can switch off the small tables in Figure 7 for heading and information objects with a simple condition, or you can automatically leave out empty table entries.
例如,您可以关闭图7中的小表格,以让表头信息以一种简单的状态显示,或者您可以忽略空白的表格条目。
3
This program begins by first checking a boundary condition -- whether or not the list is empty.