(self)
| 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): |