Expand description
Connection pool — LIFO ordering, fail-fast acquire, Condvar-based waiting.
The pool maintains a stack of idle connections. acquire() pops the top
(most recently used = warmest caches). On drop, the guard pushes the
connection back. If the pool is exhausted and no acquire_timeout is set,
acquire() returns an error immediately — no blocking, no waiting.
When acquire_timeout is set, blocked callers wait on a Condvar and are
woken when a connection is returned to the pool.
Structs§
- Pool
- A connection pool with LIFO ordering and fail-fast semantics.
- Pool
Builder - Builder for configuring a connection pool.
- Pool
Guard - A borrowed connection from the pool. Returns to the pool on drop.
- Pool
Status - Pool status metrics.
- Transaction
- A database transaction. Sends ROLLBACK on drop if not committed.