|
lintel 0.2.0
|
#include <ConnectionPool.h>
Public Attributes | |
| std::size_t | maxConnections = 0 |
| std::chrono::milliseconds | acquireTimeout { 5000 } |
Tuning of a ConnectionPool.
maxConnections encodes three operating modes with one implementation:
| value | behaviour |
|---|---|
0 | no pool; acquire() fails, the registry keeps no entry |
1 | one persistent connection, serialized between callers (SQLite default) |
N>1 | bounded pool (PostgreSQL default, parallel HTTP threads) |
| std::chrono::milliseconds lintel::db::PoolSettings::acquireTimeout { 5000 } |
Time ConnectionPool::acquire waits for a free connection before it throws.
| std::size_t lintel::db::PoolSettings::maxConnections = 0 |
Maximum number of connections held by the pool (0 = pooling disabled).