If the list were originally empty, you call pthread_cond_broadcast to post push data into the list.
如果列表原来是空的,就调用pthread_cond_broadcast以宣告列表中已经添加了数据。
If so, I simply push the record onto the existing list.
如果有,就将该记录写入现有的列表中。
After the loop is done, we push the length of the data at the end of the list.
循环完成后,我们将数据的长度压入到序列的尾部。
After the loop is done, we push the length of the data at the end of the list.
循环完成后,我们将数据的长度压入到序列的尾部。
应用推荐