MCPcopy Index your code
hub / github.com/python/cpython / _acquire_release

Method _acquire_release

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

Source from the content-addressed store, hash-verified

1629
1630 @staticmethod
1631 def _acquire_release(lock, timeout, l=None, n=1):
1632 for _ in range(n):
1633 lock.acquire()
1634 if l is not None:
1635 l.append(repr(lock))
1636 time.sleep(timeout)
1637 for _ in range(n):
1638 lock.release()
1639
1640 @warnings_helper.ignore_fork_in_thread_deprecation_warnings()
1641 def test_repr_rlock(self):

Callers

nothing calls this directly

Calls 4

acquireMethod · 0.45
appendMethod · 0.45
sleepMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected