Skip to content

Commit 24502fc

Browse files
author
Murat Kaan Meral
committed
fix(multiagent): remove no-op asyncio.gather in parallel execution
- Remove unnecessary asyncio.gather() after event loop completion - Same issue as tool executor PR strands-agents#954 - By the time loop exits, all tasks have already completed - Gather was waiting for already-finished tasks (no-op) - All 154 tests passing
1 parent a307f37 commit 24502fc

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/strands/multiagent/graph.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -625,10 +625,6 @@ async def stream_node_to_queue(node: GraphNode, node_index: int) -> None:
625625
# Forward the event immediately
626626
yield event
627627

628-
# Wait for all tasks to complete (should be immediate since they've all signaled completion)
629-
if active_tasks:
630-
await asyncio.gather(*active_tasks, return_exceptions=True)
631-
632628
def _find_newly_ready_nodes(self, completed_batch: list["GraphNode"]) -> list["GraphNode"]:
633629
"""Find nodes that became ready after the last execution."""
634630
newly_ready = []

0 commit comments

Comments
 (0)