| 1007 | self._generation += 1 |
| 1008 | |
| 1009 | def _check_init(self): |
| 1010 | if not self._initialized: |
| 1011 | if self._initializing: |
| 1012 | raise exceptions.InterfaceError( |
| 1013 | 'pool is being initialized, but not yet ready: ' |
| 1014 | 'likely there is a race between creating a pool and ' |
| 1015 | 'using it') |
| 1016 | raise exceptions.InterfaceError('pool is not initialized') |
| 1017 | if self._closed: |
| 1018 | raise exceptions.InterfaceError('pool is closed') |
| 1019 | |
| 1020 | def _drop_statement_cache(self): |
| 1021 | # Drop statement cache for all connections in the pool. |