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