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

Method test_thread_leak

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

BunchClass · 0.70

Tested by

no test coverage detected