MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / gather

Method gather

pager_lib/tqdm/asyncio.py:71–81  ·  view source on GitHub ↗

Wrapper for `asyncio.gather`.

(cls, *fs, loop=None, timeout=None, total=None, **tqdm_kwargs)

Source from the content-addressed store, hash-verified

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
84def tarange(*args, **kwargs):

Callers

nothing calls this directly

Calls 1

as_completedMethod · 0.80

Tested by

no test coverage detected