MCPcopy Index your code
hub / github.com/python/cpython / _wait_for_one

Method _wait_for_one

Lib/asyncio/tasks.py:610–618  ·  view source on GitHub ↗
(self, resolve=False)

Source from the content-addressed store, hash-verified

608 self._timeout_handle.cancel()
609
610 async def _wait_for_one(self, resolve=False):
611 # Wait for the next future to be done and return it unless resolve is
612 # set, in which case return either the result of the future or raise
613 # an exception.
614 f = await self._done.get()
615 if f is None:
616 # Dummy value from _handle_timeout().
617 raise exceptions.TimeoutError
618 return f.result() if resolve else f
619
620
621def as_completed(fs, *, timeout=None):

Callers 2

__anext__Method · 0.95
__next__Method · 0.95

Calls 2

getMethod · 0.45
resultMethod · 0.45

Tested by

no test coverage detected