Wait till the Coordinator is told to stop. Args: timeout: Float. Sleep for up to that many seconds waiting for should_stop() to become True. Returns: True if the Coordinator is told stop, False if the timeout expired.
(self, timeout=None)
| 299 | self.request_stop(ex=sys.exc_info()) |
| 300 | |
| 301 | def wait_for_stop(self, timeout=None): |
| 302 | """Wait till the Coordinator is told to stop. |
| 303 | |
| 304 | Args: |
| 305 | timeout: Float. Sleep for up to that many seconds waiting for |
| 306 | should_stop() to become True. |
| 307 | |
| 308 | Returns: |
| 309 | True if the Coordinator is told stop, False if the timeout expired. |
| 310 | """ |
| 311 | return self._stop_event.wait(timeout) |
| 312 | |
| 313 | def register_thread(self, thread): |
| 314 | """Register a thread to join. |