docs: def close(self):
          """Close all connections in the pool."""
          self._lock.acquire()
          try:
              while self._idle_cache:  # close all idle connections
                  con = self._idle_cache.pop(0)
                  try:
                      con.close()
                  except Exception:
                      pass
              if self._maxshared:  # close all shared connections
                  while self._shared_cache:
                      con = self._shared_cache.pop(0).con
                      try:
                          con.close()
                      except Exception:
                          pass
                      self._connections -= 1
              self._lock.notifyAll()
          finally:
              self._lock.release()