MCPcopy Create free account
hub / github.com/MegEngine/MegFlow / repeat

Function repeat

flow-python/examples/logical_test/process.py:16–28  ·  view source on GitHub ↗
(n, s, r)

Source from the content-addressed store, hash-verified

14
15
16def repeat(n, s, r):
17 while True:
18 message = r.recv()
19
20 if message is None:
21 break
22
23 for i in range(n):
24 msg = {}
25 msg['message'] = "a message[{}] repeat {} by process node".format(
26 message['message'], i)
27 s.send(msg)
28 print('==== logical_test pass ====')
29
30
31@register(inputs=['inp'], outputs=['out'], exclusive=True)

Callers

nothing calls this directly

Calls 3

rangeFunction · 0.85
recvMethod · 0.45
sendMethod · 0.45

Tested by

no test coverage detected