Wrapper for `asyncio.gather`.
(cls, *fs, loop=None, timeout=None, total=None, **tqdm_kwargs)
| 69 | |
| 70 | @classmethod |
| 71 | async def gather(cls, *fs, loop=None, timeout=None, total=None, **tqdm_kwargs): |
| 72 | """ |
| 73 | Wrapper for `asyncio.gather`. |
| 74 | """ |
| 75 | async def wrap_awaitable(i, f): |
| 76 | return i, await f |
| 77 | |
| 78 | ifs = [wrap_awaitable(i, f) for i, f in enumerate(fs)] |
| 79 | res = [await f for f in cls.as_completed(ifs, loop=loop, timeout=timeout, |
| 80 | total=total, **tqdm_kwargs)] |
| 81 | return [i for _, i in sorted(res)] |
| 82 | |
| 83 | |
| 84 | def tarange(*args, **kwargs): |
nothing calls this directly
no test coverage detected