MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / AsyncAdaptedQueuePool

Class AsyncAdaptedQueuePool

lib/sqlalchemy/pool/impl.py:258–276  ·  view source on GitHub ↗

An asyncio-compatible version of :class:`.QueuePool`. This pool is used by default when using :class:`.AsyncEngine` engines that were generated from :func:`_asyncio.create_async_engine`. It uses an asyncio-compatible queue implementation that does not use ``threading.Lock``.

Source from the content-addressed store, hash-verified

256
257
258class AsyncAdaptedQueuePool(QueuePool):
259 """An asyncio-compatible version of :class:`.QueuePool`.
260
261 This pool is used by default when using :class:`.AsyncEngine` engines that
262 were generated from :func:`_asyncio.create_async_engine`. It uses an
263 asyncio-compatible queue implementation that does not use
264 ``threading.Lock``.
265
266 The arguments and operation of :class:`.AsyncAdaptedQueuePool` are
267 otherwise identical to that of :class:`.QueuePool`.
268
269 """
270
271 _is_asyncio = True
272 _queue_class: Type[sqla_queue.QueueCommon[ConnectionPoolEntry]] = (
273 sqla_queue.AsyncAdaptedQueue
274 )
275
276 _dialect = _AsyncConnDialect()
277
278
279class NullPool(Pool):

Callers

nothing calls this directly

Calls 1

_AsyncConnDialectClass · 0.85

Tested by

no test coverage detected