fix: insert await asyncio.sleep(0) to yield control in loop (#1186)

This commit is contained in:
you-n-g
2025-08-15 13:27:29 +08:00
committed by GitHub
parent 254eb56da3
commit bfbdbcfbbd
+1
View File
@@ -304,6 +304,7 @@ class LoopBase:
await self._run_step(li)
self.queue.put_nowait(li) # the loop `li` has been kicked off, waiting for workers to pick it up
self.loop_idx += 1
await asyncio.sleep(0)
async def execute_loop(self) -> None:
while True: