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

Method __init__

Lib/asyncio/tasks.py:561–574  ·  view source on GitHub ↗
(self, aws, timeout)

Source from the content-addressed store, hash-verified

559 result of the next underlying future to complete.
560 """
561 def __init__(self, aws, timeout):
562 self._done = queues.Queue()
563 self._timeout_handle = None
564
565 loop = events.get_event_loop()
566 todo = {ensure_future(aw, loop=loop) for aw in set(aws)}
567 for f in todo:
568 f.add_done_callback(self._handle_completion)
569 if todo and timeout is not None:
570 self._timeout_handle = (
571 loop.call_later(timeout, self._handle_timeout)
572 )
573 self._todo = todo
574 self._todo_left = len(todo)
575
576 def __aiter__(self):
577 return self

Callers

nothing calls this directly

Calls 6

ensure_futureFunction · 0.85
setFunction · 0.85
QueueMethod · 0.80
get_event_loopMethod · 0.45
add_done_callbackMethod · 0.45
call_laterMethod · 0.45

Tested by

no test coverage detected