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

Method _parallel_render

src/py/reactpy/reactpy/core/layout.py:150–158  ·  view source on GitHub ↗

Await to fetch the first completed render within our asyncio task group. We use the `asyncio.tasks.wait` API in order to return the first completed task.

(self)

Source from the content-addressed store, hash-verified

148 return await self._create_layout_update(model_state)
149
150 async def _parallel_render(self) -> LayoutUpdateMessage:
151 """Await to fetch the first completed render within our asyncio task group.
152 We use the `asyncio.tasks.wait` API in order to return the first completed task.
153 """
154 await self._render_tasks_ready.acquire()
155 done, _ = await wait(self._render_tasks, return_when=FIRST_COMPLETED)
156 update_task: Task[LayoutUpdateMessage] = done.pop()
157 self._render_tasks.remove(update_task)
158 return update_task.result()
159
160 async def _create_layout_update(
161 self, old_state: _ModelState

Callers 1

renderMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected