MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / AsyncAdaptedQueuePool

Class AsyncAdaptedQueuePool

lib/sqlalchemy/pool/impl.py:260–278  ·  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

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

Callers

nothing calls this directly

Calls 1

_AsyncConnDialectClass · 0.85

Tested by

no test coverage detected