def main(): q = DistribOutputPipe('jacinle.test') with control(pipes=[q]): while True: data = { 'msg': 'hello', 'current': time.time(), 'data': np.zeros(shape=(128, 224, 224, 3), dtype='float32') } print('RFlow sending', data['current']) q.put(data)
def recv_thread(): q = DistribInputPipe('jacinle.test') with control(pipes=[q]): while True: q.get() next(counter)
def main(): q = DistribInputPipe('jacinle.test') with control(pipes=[q]): for i in range(10): stprint(q.get()) time.sleep(1)