def consumer(m: Manager, uid: str): import os print(os.getpid(), "!") with m.open_reader_queue(uid) as q: for item in q: print(os.getpid(), "<-", item)
def worker(m: Manager, uid): import os with m.open_reader_queue(uid) as q: for item in q: print(os.getpid(), item)
def consume(m: Manager, uid: str) -> None: with m.open_reader_queue(uid) as q: for x in q: print(os.getpid(), "<-", x) time.sleep(0.1)