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

Class _AcquireFutures

Lib/concurrent/futures/_base.py:135–147  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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

Callers 2

as_completedFunction · 0.85
waitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…