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

Method test_different_thread

Lib/test/lock_tests.py:295–304  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

293 self.wait_phase(phase, 2)
294
295 def test_different_thread(self):
296 # Lock can be released from a different thread.
297 lock = self.locktype()
298 lock.acquire()
299 def f():
300 lock.release()
301 with Bunch(f, 1):
302 pass
303 lock.acquire()
304 lock.release()
305
306 def test_state_after_timeout(self):
307 # Issue #11618: check that lock is in a proper state after a

Callers

nothing calls this directly

Calls 3

BunchClass · 0.70
acquireMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected