Join threads with a 5-minute timeout, assert joins succeeded
(tasks)
| 147 | |
| 148 | |
| 149 | def joinall(tasks): |
| 150 | """Join threads with a 5-minute timeout, assert joins succeeded""" |
| 151 | if _IS_SYNC: |
| 152 | for t in tasks: |
| 153 | t.join(300) |
| 154 | assert not t.is_alive(), "Thread %s hung" % t |
| 155 | else: |
| 156 | asyncio.wait([t.task for t in tasks if t is not None], timeout=300) |
| 157 | |
| 158 | |
| 159 | def flaky( |