MCPcopy Index your code
hub / github.com/dask/dask / acquire

Method acquire

dask/array/tests/test_array_core.py:2345–2351  ·  view source on GitHub ↗
(self, blocking: bool = True, timeout: float = -1)

Source from the content-addressed store, hash-verified

2343 self.release_count = 0
2344
2345 def acquire(self, blocking: bool = True, timeout: float = -1) -> bool:
2346 acquired = self.lock.acquire(blocking=blocking, timeout=timeout)
2347 if acquired:
2348 # int.__iadd__ is atomic on GIL-enabld interpreters; when the GIL is
2349 # disabled things are nuanced and hardware-dependent. Don't risk it.
2350 self.acquire_count += 1
2351 return acquired
2352
2353 def release(self) -> None:
2354 if self.lock.locked():

Callers 1

Calls 1

acquireMethod · 0.45

Tested by

no test coverage detected