Spaces:
Runtime error
Runtime error
File size: 322 Bytes
8a58cf3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
"""Async utils."""
import asyncio
from typing import Any, Coroutine, List
def run_async_tasks(tasks: List[Coroutine]) -> List[Any]:
"""Run a list of async tasks."""
async def _gather() -> List[Any]:
return await asyncio.gather(*tasks)
outputs: List[Any] = asyncio.run(_gather())
return outputs
|