Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions litellm/timeout.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,13 @@ async def async_wrapper(*args, **kwargs):


class _LoopWrapper(Thread):
"""Daemon thread that owns a dedicated asyncio event loop.

Used by the sync branch of :func:`timeout` to run a coroutine on a
background event loop so the calling thread can wait on it with a
timeout via :func:`asyncio.run_coroutine_threadsafe`.
"""

def __init__(self):
super().__init__(daemon=True)
self.loop = asyncio.new_event_loop()
Expand Down
Loading