(self)
| 231 | return False |
| 232 | |
| 233 | def _run(self) -> None: |
| 234 | while not self._should_stop(): |
| 235 | try: |
| 236 | if not self._target(): |
| 237 | self._stopped = True |
| 238 | break |
| 239 | # Catch KeyboardInterrupt, etc. and cleanup. |
| 240 | except BaseException: |
| 241 | with self._lock: |
| 242 | self._stopped = True |
| 243 | self._thread_will_exit = True |
| 244 | |
| 245 | raise |
| 246 | |
| 247 | if self._skip_sleep: |
| 248 | self._skip_sleep = False |
| 249 | else: |
| 250 | deadline = time.monotonic() + self._interval |
| 251 | while not self._stopped and time.monotonic() < deadline: |
| 252 | time.sleep(self._min_interval) |
| 253 | if self._event: |
| 254 | break # Early wake. |
| 255 | |
| 256 | self._event = False |
| 257 | |
| 258 | |
| 259 | # _EXECUTORS has a weakref to each running PeriodicExecutor. Once started, |
nothing calls this directly
no test coverage detected