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

Method test_join_with_timeout

Lib/test/test_threading.py:608–621  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

606 raise errors[0]
607
608 def test_join_with_timeout(self):
609 lock = _thread.allocate_lock()
610 lock.acquire()
611
612 def worker():
613 lock.acquire()
614
615 thread = threading.Thread(target=worker)
616 thread.start()
617 thread.join(timeout=0.01)
618 assert thread.is_alive()
619 lock.release()
620 thread.join()
621 assert not thread.is_alive()
622
623 def test_no_refcycle_through_target(self):
624 class RunSelfFunction(object):

Callers

nothing calls this directly

Calls 5

startMethod · 0.95
joinMethod · 0.95
is_aliveMethod · 0.95
acquireMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected