Stops the serve_forever loop. Blocks until the loop has finished. This must be called while serve_forever() is running in another thread, or it will deadlock.
(self)
| 242 | self.__is_shut_down.set() |
| 243 | |
| 244 | def shutdown(self): |
| 245 | """Stops the serve_forever loop. |
| 246 | |
| 247 | Blocks until the loop has finished. This must be called while |
| 248 | serve_forever() is running in another thread, or it will |
| 249 | deadlock. |
| 250 | """ |
| 251 | self.__shutdown_request = True |
| 252 | self.__is_shut_down.wait() |
| 253 | |
| 254 | def service_actions(self): |
| 255 | """Called by the serve_forever() loop. |