chore: use running event loop in async helpers (#821)

This commit is contained in:
Rolly Calma
2026-06-02 11:28:05 +08:00
committed by GitHub
parent c99193041a
commit 32efeeb3a2
4 changed files with 7 additions and 6 deletions

View File

@@ -38,7 +38,7 @@ async def _cached(key: Tuple, ttl: float, fetch: Callable[[], Awaitable[Any]]) -
pending = fut
owner = False
else:
loop = asyncio.get_event_loop()
loop = asyncio.get_running_loop()
fut = loop.create_future()
_shared_cache_pending[key] = fut
pending = fut