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

Class NonthreadSafeStore

dask/array/tests/test_array_core.py:2302–2311  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

test_store_locksFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_store_locksFunction · 0.68