MCPcopy Index your code
hub / github.com/MagicStack/asyncpg / _async__init__

Method _async__init__

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

Source from the content-addressed store, hash-verified

427 max_inactive_connection_lifetime
428
429 async def _async__init__(self):
430 if self._initialized:
431 return self
432 if self._initializing:
433 raise exceptions.InterfaceError(
434 'pool is being initialized in another task')
435 if self._closed:
436 raise exceptions.InterfaceError('pool is closed')
437 self._initializing = True
438 try:
439 await self._initialize()
440 return self
441 finally:
442 self._initializing = False
443 self._initialized = True
444
445 async def _initialize(self):
446 self._queue = asyncio.LifoQueue(maxsize=self._maxsize)

Callers 2

__await__Method · 0.95
__aenter__Method · 0.95

Calls 1

_initializeMethod · 0.95

Tested by

no test coverage detected