Ask the background watch loop to stop and join the thread.
(self)
| 150 | self._thread.start() |
| 151 | |
| 152 | def stop(self): |
| 153 | """Ask the background watch loop to stop and join the thread.""" |
| 154 | self._stop_event.set() |
| 155 | if self._watch is not None: |
| 156 | self._watch.stop() |
| 157 | if self._thread is not None: |
| 158 | self._thread.join() |
| 159 | self._thread = None |
| 160 | |
| 161 | # ---------------------------------------------------------------- # |
| 162 | # Internal helpers # |
no outgoing calls