Skip to main content

Module pool

Module pool 

Source
Expand description

PostgreSQL connection pool โ€” lock-free implementation.

Uses LockFreePool<tokio_postgres::Client> internally. No mutexes, no semaphores, no kernel transitions on the hot path โ€” only CAS loops on crossbeam::queue::ArrayQueue and atomic size tracking.

The acquire() method returns a PooledConnection which auto-returns to the pool on Drop. There is no explicit release() needed.

Structsยง

ConnectionPool
Wrapper around the lock-free connection pool.