MCPcopy Index your code
hub / github.com/reactive-python/reactpy / _single_outgoing_loop

Function _single_outgoing_loop

src/py/reactpy/reactpy/core/serve.py:57–72  ·  view source on GitHub ↗
(
    layout: LayoutType[LayoutUpdateMessage, LayoutEventMessage], send: SendCoroutine
)

Source from the content-addressed store, hash-verified

55
56
57async def _single_outgoing_loop(
58 layout: LayoutType[LayoutUpdateMessage, LayoutEventMessage], send: SendCoroutine
59) -> None:
60 while True:
61 update = await layout.render()
62 try:
63 await send(update)
64 except Exception: # nocov
65 if not REACTPY_DEBUG_MODE.current:
66 msg = (
67 "Failed to send update. More info may be available "
68 "if you enabling debug mode by setting "
69 "`reactpy.config.REACTPY_DEBUG_MODE.current = True`."
70 )
71 logger.error(msg)
72 raise
73
74
75async def _single_incoming_loop(

Callers

nothing calls this directly

Calls 2

sendFunction · 0.50
renderMethod · 0.45

Tested by

no test coverage detected