def _get_or_create_stream(self, stream_id, allowed_ids):
        try:
            return self.streams[stream_id]
        except KeyError:
            return self._begin_new_stream(stream_id, allowed_ids)
Stop the receiver thread, wait until it's finished.
dataset/ETHPy150Open python-hyper/hyper-h2/h2/connection.py/H2Connection._get_or_create_stream--crossover with--dataset/ETHPy150Open pyserial/pyserial/examples/wxTerminal.py/TerminalFrame.StopThread