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

Method test_join_with_timeout

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

Source from the content-addressed store, hash-verified

557 raise errors[0]
558
559 def test_join_with_timeout(self):
560 lock = _thread.allocate_lock()
561 lock.acquire()
562
563 def worker():
564 lock.acquire()
565
566 thread = threading.Thread(target=worker)
567 thread.start()
568 thread.join(timeout=0.01)
569 assert thread.is_alive()
570 lock.release()
571 thread.join()
572 assert not thread.is_alive()
573
574 def test_no_refcycle_through_target(self):
575 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