import time
def consumer(name):
print("%s 准备 吃包子“%name)
while Ture:
baozi=yield--------------------------send 传的i
print("包子[%s]来了,被[%s]吃了!"%(baozi,name))
def producer(name)
c=consumer('A')
c2=consumer('B')
c._next_()
c2._next_()
print("开始做包子了")
for i in range(10):
time.sleep(1)
print("做了2个包子")
c.send(i)
c2.send(i)
producer("zy")