code: def _wait_for_retransmit_thread(transaction):
          
          if hasattr(transaction, 'retransmit_thread'):
              while transaction.retransmit_thread is not None:
                  logger.debug("Waiting for retransmit thread to finish ...")
                  time.sleep(0.01)
                  continue
docs: Only one retransmit thread at a time, wait for other to finish