MCPcopy Index your code
hub / github.com/RustPython/RustPython / _acquire_release

Method _acquire_release

Lib/test/_test_multiprocessing.py:1453–1460  ·  view source on GitHub ↗
(lock, timeout, l=None, n=1)

Source from the content-addressed store, hash-verified

1451
1452 @staticmethod
1453 def _acquire_release(lock, timeout, l=None, n=1):
1454 for _ in range(n):
1455 lock.acquire()
1456 if l is not None:
1457 l.append(repr(lock))
1458 time.sleep(timeout)
1459 for _ in range(n):
1460 lock.release()
1461
1462 @unittest.skip("TODO: RUSTPYTHON; flaky timeout - thread start latency")
1463 def test_repr_rlock(self):

Callers

nothing calls this directly

Calls 5

reprFunction · 0.85
acquireMethod · 0.45
appendMethod · 0.45
sleepMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected