Skip to content

Commit 892834e

Browse files
committed
fix: revert to thread-safe queue and remove unreachable logic per review
Signed-off-by: Akshat Kumar <akshat230405@gmail.com>
1 parent 8de205a commit 892834e

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/google/adk/runners.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ def run(
415415
The events generated by the agent.
416416
"""
417417
run_config = run_config or RunConfig()
418-
event_queue: asyncio.Queue[Event] = asyncio.Queue()
418+
event_queue: queue.Queue[Optional[Event]] = queue.Queue()
419419

420420
async def _invoke_run_async():
421421
try:

tests/unittests/cli/test_fast_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1414,8 +1414,8 @@ def test_builder_save_rejects_traversal(builder_test_client, tmp_path):
14141414

14151415
async def _noop_run_async(*args, **kwargs):
14161416
"""A mock that does nothing and yields no events for no-op resume tests."""
1417-
for item in []:
1418-
yield item
1417+
if False:
1418+
yield
14191419

14201420

14211421
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)