MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / dispose

Method dispose

lib/sqlalchemy/pool/impl.py:391–402  ·  view source on GitHub ↗

Dispose of this pool.

(self)

Source from the content-addressed store, hash-verified

389 self._all_conns = other_singleton_pool._all_conns
390
391 def dispose(self) -> None:
392 """Dispose of this pool."""
393
394 for conn in self._all_conns:
395 try:
396 conn.close()
397 except Exception:
398 # pysqlite won't even let you close a conn from a thread
399 # that didn't create it
400 pass
401
402 self._all_conns.clear()
403
404 def _cleanup(self) -> None:
405 while len(self._all_conns) >= self.size:

Callers

nothing calls this directly

Calls 2

closeMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected