Terminate all connections in the pool.
(self)
| 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. |