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

Method test_thread_leak

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

Source from the content-addressed store, hash-verified

212
213 @unittest.skip("TODO: RUSTPYTHON; sometimes hangs")
214 def test_thread_leak(self):
215 # The lock shouldn't leak a Thread instance when used from a foreign
216 # (non-threading) thread.
217 lock = self.locktype()
218 def f():
219 lock.acquire()
220 lock.release()
221
222 # We run many threads in the hope that existing threads ids won't
223 # be recycled.
224 with Bunch(f, 15):
225 pass
226
227 def test_timeout(self):
228 lock = self.locktype()

Callers

nothing calls this directly

Calls 1

BunchClass · 0.70

Tested by

no test coverage detected