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('