Skip to content

Commit 5705be0

Browse files
authored
fix: insert await asyncio.sleep(0) to yield control in loop (#1186)
1 parent 684ef06 commit 5705be0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

rdagent/utils/workflow/loop.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ async def kickoff_loop(self) -> None:
304304
await self._run_step(li)
305305
self.queue.put_nowait(li) # the loop `li` has been kicked off, waiting for workers to pick it up
306306
self.loop_idx += 1
307+
await asyncio.sleep(0)
307308

308309
async def execute_loop(self) -> None:
309310
while True:

0 commit comments

Comments
 (0)