数据不安全,不常用 import time from multiprocessing import Pipe, Process def producer(prod, cons, name, food): cons.close() for i in range(10): f = '%s生产%s%s' % (name, food, i) prod.send(f) time.sleep(0.5) print(f) prod.close() def consumer(prod, cons, name):…