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

Method test_try_acquire_contended

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

Source from the content-addressed store, hash-verified

152 lock.release()
153
154 def test_try_acquire_contended(self):
155 lock = self.locktype()
156 lock.acquire()
157 result = []
158 def f():
159 result.append(lock.acquire(False))
160 with Bunch(f, 1):
161 pass
162 self.assertFalse(result[0])
163 lock.release()
164
165 @unittest.skip("TODO: RUSTPYTHON; sometimes hangs")
166 def test_acquire_contended(self):

Callers

nothing calls this directly

Calls 4

assertFalseMethod · 0.80
BunchClass · 0.70
acquireMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected