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

Method test_join_with_timeout

Lib/test/test_thread.py:300–313  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

298 raise error
299
300 def test_join_with_timeout(self):
301 lock = thread.allocate_lock()
302 lock.acquire()
303
304 def thr():
305 lock.acquire()
306
307 with threading_helper.wait_threads_exit():
308 handle = thread.start_joinable_thread(thr)
309 handle.join(0.1)
310 self.assertFalse(handle.is_done())
311 lock.release()
312 handle.join()
313 self.assertTrue(handle.is_done())
314
315 def test_join_unstarted(self):
316 handle = thread._ThreadHandle()

Callers

nothing calls this directly

Calls 5

assertFalseMethod · 0.80
assertTrueMethod · 0.80
acquireMethod · 0.45
joinMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected