Exemple #1
0
def produce(m: Manager, uid):
    with m.open_writer_queue(uid) as q:
        for i in range(5):
            logger.info("-> %d", i)
            q.put(i)
            time.sleep(0.3)
        q.put(None)
Exemple #2
0
def producer(m: Manager, uid: str):
    with m.open_writer_queue(uid, force=True) as q:
        for i in range(20):
            q.put(i)
            time.sleep(0.01)
        q.put(None)