()
| 311 | py_db = self.py_db |
| 312 | |
| 313 | def can_exit(): |
| 314 | with py_db._main_lock: |
| 315 | # Note: it's important to get the lock besides checking that it's empty (this |
| 316 | # means that we're not in the middle of some command processing). |
| 317 | writer = py_db.writer |
| 318 | writer_empty = writer is not None and writer.empty() |
| 319 | |
| 320 | return not py_db.has_user_threads_alive() and writer_empty |
| 321 | |
| 322 | try: |
| 323 | while not self._kill_received: |
nothing calls this directly
no test coverage detected