MCPcopy Create free account
hub / github.com/MagicStack/asyncpg / terminate

Method terminate

asyncpg/pool.py:1114–1123  ·  view source on GitHub ↗

Terminate all connections in the pool.

(self)

Source from the content-addressed store, hash-verified

1112 'Pool.close().')
1113
1114 def terminate(self):
1115 """Terminate all connections in the pool."""
1116 if self._closed:
1117 return
1118 self._check_init()
1119 self._closed = True
1120 if self._maintenance_task is not None:
1121 self._maintenance_task.cancel()
1122 for ch in self._holders:
1123 ch.terminate()
1124
1125 async def expire_connections(self):
1126 """Expire all currently open connections.

Calls 2

_check_initMethod · 0.95
cancelMethod · 0.45