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``.
| 256 | |
| 257 | |
| 258 | class 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 | |
| 279 | class NullPool(Pool): |
nothing calls this directly
no test coverage detected