def _terminate_service(self):
        """Force termination of running service.
        Disconnect queues, end queue feeder threads.
        Wait for service process to clear, drop all references."""
        with self.__lock:
            if self._service:
                self._service.terminate()
            if self._pipe_commands:
                self._pipe_commands.close()
            if self._pipe_service:
                self._pipe_service.close()
            self._pipe_commands = None
            self._pipe_service = None
            self._service_class_name = None
            self._service_name = None
            if self._service_status != CommonService.SERVICE_STATUS_TEARDOWN:
                self.update_status(status_code=CommonService.SERVICE_STATUS_END)
            if self._service:
                self._service.join()  # must wait for process to be actually destroyed
            self._service = None
def _terminate_service ( self ) : with self . __lock : if self . _service : self . _service . terminate ( ) if self . _pipe_commands : self . _pipe_commands . close ( ) if self . _pipe_service : self . _pipe_service . close ( ) self . _pipe_commands = None self . _pipe_service = None self . _service_class_name = None self . _service_name = None if self . _service_status != CommonService . SERVICE_STATUS_TEARDOWN : self . update_status ( status_code = CommonService . SERVICE_STATUS_END ) if self . _service : self . _service . join ( ) self . _service = None
Force termination of running service.
        Disconnect queues, end queue feeder threads.
        Wait for service process to clear, drop all references.