예제 #1
0
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)
예제 #2
0
def worker(m: Manager, uid):
    import os

    with m.open_reader_queue(uid) as q:
        for item in q:
            print(os.getpid(), item)
예제 #3
0
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)