MCPcopy Create free account
hub / github.com/dask/dask / __setitem__

Method __setitem__

dask/array/tests/test_array_core.py:2321–2331  ·  view source on GitHub ↗
(self, key, value)

Source from the content-addressed store, hash-verified

2319 self._lock = Lock()
2320
2321 def __setitem__(self, key, value):
2322 with self._lock:
2323 self.concurrent_uses += 1
2324 self.max_concurrent_uses = max(
2325 self.concurrent_uses, self.max_concurrent_uses
2326 )
2327 time.sleep(0.01)
2328 with self._lock:
2329 # int.__iadd__ is atomic on GIL-enabld interpreters; when the GIL is
2330 # disabled things are nuanced and hardware-dependent. Don't risk it.
2331 self.concurrent_uses -= 1
2332
2333
2334class BrokenStore:

Callers

nothing calls this directly

Calls 1

maxFunction · 0.85

Tested by

no test coverage detected