import time import random from multiprocessing import Process from multiprocessing import Queue def consumer(q,name): while True: f = q.get() if f == None: break # 解决方法之一(比较笨) time.sleep(random.randint(1, 3)) print('