We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f964d5 commit 84895b6Copy full SHA for 84895b6
1 file changed
vertexai/preview/reasoning_engines/templates/adk.py
@@ -627,15 +627,17 @@ def _asyncio_thread_main():
627
asyncio.run(_invoke_agent_async())
628
except RuntimeError as e:
629
event_queue.put(e)
630
+ finally:
631
+ # Use None as a sentinel to stop the main thread.
632
+ event_queue.put(None)
633
634
thread = threading.Thread(target=_asyncio_thread_main)
635
thread.start()
636
637
try:
638
while True:
- try:
- event = event_queue.get(timeout=30)
- except queue.Empty:
639
+ event = event_queue.get()
640
+ if event is None:
641
break
642
if isinstance(event, RuntimeError):
643
raise event
0 commit comments