def StopThread(self):
        if self.thread is not None:
            self.alive.clear()          # clear alive event for thread
            self.thread.join()          # wait until thread has finished
            self.thread = None
Stop the receiver thread, wait until it's finished.
dataset/ETHPy150Open pyserial/pyserial/examples/wxTerminal.py/TerminalFrame.StopThread