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