'wait for worker threads to terminate'

def join(self, transmit_only=False):

    self.transmitter_thread.join()
    if (not transmit_only):
        if hasattr(self.serial, 'cancel_read'):
            self.serial.cancel_read()
        self.receiver_thread.join()
