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

Class _AcquireFutures

Lib/concurrent/futures/_base.py:141–153  ·  view source on GitHub ↗

A context manager that does an ordered acquire of Future conditions.

Source from the content-addressed store, hash-verified

139 self._decrement_pending_calls()
140
141class _AcquireFutures(object):
142 """A context manager that does an ordered acquire of Future conditions."""
143
144 def __init__(self, futures):
145 self.futures = sorted(futures, key=id)
146
147 def __enter__(self):
148 for future in self.futures:
149 future._condition.acquire()
150
151 def __exit__(self, *args):
152 for future in self.futures:
153 future._condition.release()
154
155def _create_and_install_waiters(fs, return_when):
156 if return_when == _AS_COMPLETED:

Callers 2

as_completedFunction · 0.85
waitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected