def stop_thread(self): """ Description: clean thread when process exit. Input: NA Returns: NA """ channel_manager = ChannelManager([]) channel_manager.close_all_thread() self.set_exit_switch() self.app_manager.set_thread_switch()
def close_all_thread(signum, frame): '''close all thread of the process, and exit.''' logging.info("receive signal, signum:%s, frame:%s", signum, frame) webapp.stop_webapp() SOCKET_SERVER.stop_thread() channel_manager = ChannelManager() channel_manager.close_all_thread() logging.info("presenter server exit by Ctrl + c") sys.exit()
def stop_thread(self): channel_manager = ChannelManager([]) channel_manager.close_all_thread() self.set_exit_switch()