(self)
| 81 | _sessions_changed.set() |
| 82 | |
| 83 | def notify_changed(self): |
| 84 | with self: |
| 85 | self._changed_condition.notify_all() |
| 86 | |
| 87 | # A session is considered ended once all components disconnect, and there |
| 88 | # are no further incoming messages from anything to handle. |
| 89 | components = self.client, self.launcher, self.server |
| 90 | if all(not com or not com.is_connected for com in components): |
| 91 | with _lock: |
| 92 | if self in _sessions: |
| 93 | log.info("{0} has ended.", self) |
| 94 | _sessions.remove(self) |
| 95 | _sessions_changed.set() |
| 96 | |
| 97 | def wait_for(self, predicate, timeout=None): |
| 98 | """Waits until predicate() becomes true. |
no test coverage detected