Blocks until all sessions have ended. A session ends when all components that it manages disconnect from it.
()
| 272 | |
| 273 | |
| 274 | def wait_until_ended(): |
| 275 | """Blocks until all sessions have ended. |
| 276 | |
| 277 | A session ends when all components that it manages disconnect from it. |
| 278 | """ |
| 279 | while True: |
| 280 | with _lock: |
| 281 | if not len(_sessions): |
| 282 | return |
| 283 | _sessions_changed.clear() |
| 284 | _sessions_changed.wait() |
| 285 | |
| 286 | |
| 287 | def report_sockets(): |