一、Queue是通过multiprocessing使用
from multiprocessing import Process,Queue import time import random import os def consumer(q): while True: res=q.get() if res is None: break time.sleep(random.randint(1,3)) print('
from multiprocessing import Process,Queue import time import random import os def consumer(q): while True: res=q.get() if res is None: break time.sleep(random.randint(1,3)) print('