python-parallel-programming-cookbook-cn
python-parallel-programming-cookbook-cn copied to clipboard
ch3.7 队列部分代码运行结果不同
使用队列交换对象,会先输出the queue is empty
,然后跳出Consumer。
Python版本:3.6.7 运行结果:
Process Producer : item 160 appended to queue Producer-13 the queue is empty The size of queue is 1 Process Producer : item 8 appended to queue Producer-13 The size of queue is 2 Process Producer : item 219 appended to queue Producer-13 The size of queue is 3 Process Producer : item 211 appended to queue Producer-13 The size of queue is 4 Process Producer : item 25 appended to queue Producer-13 The size of queue is 5
好像是会这样,我回头看下。