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

Method _check_init

asyncpg/pool.py:1135–1144  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1133 self._generation += 1
1134
1135 def _check_init(self):
1136 if not self._initialized:
1137 if self._initializing:
1138 raise exceptions.InterfaceError(
1139 'pool is being initialized, but not yet ready: '
1140 'likely there is a race between creating a pool and '
1141 'using it')
1142 raise exceptions.InterfaceError('pool is not initialized')
1143 if self._closed:
1144 raise exceptions.InterfaceError('pool is closed')
1145
1146 def _drop_statement_cache(self):
1147 # Drop statement cache for all connections in the pool.

Callers 4

_acquireMethod · 0.95
releaseMethod · 0.95
closeMethod · 0.95
terminateMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected