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

Class NonthreadSafeStore

dask/array/tests/test_array_core.py:2300–2309  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2298
2299
2300class NonthreadSafeStore:
2301 def __init__(self):
2302 self.in_use = False
2303
2304 def __setitem__(self, key, value):
2305 if self.in_use:
2306 raise ThreadSafetyError()
2307 self.in_use = True
2308 time.sleep(0.001)
2309 self.in_use = False
2310
2311
2312class ThreadSafeStore:

Callers 1

test_store_locksFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_store_locksFunction · 0.68