You've already forked adk-python
mirror of
https://github.com/encounter/adk-python.git
synced 2026-03-30 10:57:20 -07:00
chore: remove unecessary event loop creation in LiveRequstQueue constructor
Before Python 3.10, asyncio.Queue() required a running event loop at creation time. This was deprecated in 3.8-3.9 and fully removed in 3.10. ADK requires Python 3.10+, thus remove this unecessary logic Co-authored-by: Xiang (Sean) Zhou <seanzhougoogle@google.com> PiperOrigin-RevId: 852989791
This commit is contained in:
committed by
Copybara-Service
parent
6dce7f8a8f
commit
ecc9f182e3
@@ -45,15 +45,6 @@ class LiveRequestQueue:
|
||||
"""Queue used to send LiveRequest in a live(bidirectional streaming) way."""
|
||||
|
||||
def __init__(self):
|
||||
# Ensure there's an event loop available in this thread
|
||||
try:
|
||||
asyncio.get_running_loop()
|
||||
except RuntimeError:
|
||||
# No running loop, create one
|
||||
loop = asyncio.new_event_loop()
|
||||
asyncio.set_event_loop(loop)
|
||||
|
||||
# Now create the queue (it will use the event loop we just ensured exists)
|
||||
self._queue = asyncio.Queue()
|
||||
|
||||
def close(self):
|
||||
|
||||
Reference in New Issue
Block a user