add default timeout to wait_for_task (#1122)

This commit is contained in:
Shuchang Zheng
2024-11-03 22:19:55 -08:00
committed by GitHub
parent 2ac8a1a7d0
commit d0a35622a7
3 changed files with 42 additions and 14 deletions

View File

@@ -0,0 +1,5 @@
import asyncio
def is_aio_task_running(aio_task: asyncio.Task) -> bool:
return not aio_task.done() and not aio_task.cancelled()