docs: def lookup_domains(self):
          """More complex DNS primitive that looks up domains concurrently
  
          Note: if you want to lookup multiple domains, you should use
          this function
          """
          thread_error = False
          thread_wait_timeout = 200
          ind = 1
          total_item_count = len(self.domains)
          for domain in self.domains:
              for nameserver in self.nameservers:
                  wait_time = 0
                  while threading.active_count() > self.max_threads:
                      time.sleep(1)
                      wait_time += 1
                      if wait_time > thread_wait_timeout:
                          thread_error = True
                          break
  
                  if thread_error:
                      self.results["error"] = "Threads took too long to finish."
                      break
                  log_prefix = "%d/%d: " % (ind, total_item_count)
                  thread = threading.Thread(target=self.lookup_domain,
                                            args=(domain, nameserver,
                                                  log_prefix))
                  thread.setDaemon(1)
  
                  thread_open_success = False
                  retries = 0
                  while not thread_open_success and retries < MAX_THREAD_START_RETRY:
                      try:
                          thread.start()
                          self.threads.append(thread)
                          thread_open_success = True
                      except:
                          retries += 1
                          time.sleep(THREAD_START_DELAY)
                          logging.error("%sThread start failed for %s, retrying... (%d/%d)" % (log_prefix, domain, retries, MAX_THREAD_START_RETRY))
  
                  if retries == MAX_THREAD_START_RETRY:
                      logging.error("%sCan't start a new thread for %s after %d retries." % (log_prefix, domain, retries))
  
              if thread_error:
                  break
              ind += 1
  
          for thread in self.threads:
              thread.join(self.timeout * 3)
          return self.results