Check if stop was requested. Returns: True if a stop was requested.
(self)
| 255 | self._stop_event.clear() |
| 256 | |
| 257 | def should_stop(self): |
| 258 | """Check if stop was requested. |
| 259 | |
| 260 | Returns: |
| 261 | True if a stop was requested. |
| 262 | """ |
| 263 | return self._stop_event.is_set() |
| 264 | |
| 265 | @contextlib.contextmanager |
| 266 | def stop_on_exception(self): |
no outgoing calls