code: def close_thread_handles(self):
          
          for aThread in self.iter_threads():
              try:
                  aThread.close_handle()
              except Exception:
                  try:
                      e = sys.exc_info()[1]
                      msg = "Cannot close thread handle %s, reason: %s"
                      msg %= (aThread.hThread.value, str(e))
                      warnings.warn(msg)
                  except Exception:
                      pass
docs: Closes all open handles to threads in the snapshot.