(self)
| 560 | self.assertTrue(r) |
| 561 | |
| 562 | def test_set_and_clear(self): |
| 563 | # gh-57711: check that wait() returns true even when the event is |
| 564 | # cleared before the waiting thread is woken up. |
| 565 | event = self.eventtype() |
| 566 | results = [] |
| 567 | def f(): |
| 568 | results.append(event.wait(support.LONG_TIMEOUT)) |
| 569 | |
| 570 | N = 5 |
| 571 | with Bunch(f, N): |
| 572 | # Threads blocked on event.wait() |
| 573 | wait_threads_blocked(N) |
| 574 | |
| 575 | # Threads unblocked |
| 576 | event.set() |
| 577 | event.clear() |
| 578 | |
| 579 | self.assertEqual(results, [True] * N) |
| 580 | |
| 581 | @requires_fork |
| 582 | def test_at_fork_reinit(self): |
nothing calls this directly
no test coverage detected