MCPcopy Index your code
hub / github.com/RustPython/RustPython / result_iterator

Method result_iterator

Lib/concurrent/futures/_base.py:612–624  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

610 # Yield must be hidden in closure so that the futures are submitted
611 # before the first iterator value is required.
612 def result_iterator():
613 try:
614 # reverse to keep finishing order
615 fs.reverse()
616 while fs:
617 # Careful not to keep a reference to the popped future
618 if timeout is None:
619 yield _result_or_cancel(fs.pop())
620 else:
621 yield _result_or_cancel(fs.pop(), end_time - time.monotonic())
622 finally:
623 for future in fs:
624 future.cancel()
625 return result_iterator()
626
627 def shutdown(self, wait=True, *, cancel_futures=False):

Callers

nothing calls this directly

Calls 4

_result_or_cancelFunction · 0.85
reverseMethod · 0.45
popMethod · 0.45
cancelMethod · 0.45

Tested by

no test coverage detected