Module deltachat::sql::pool

source ·
Expand description

SQLite connection pool.

The connection pool holds a number of SQLite connections and allows to allocate them. When allocated connection is dropped, underlying connection is returned back to the pool.

The pool is organized as a stack. It always allocates the most recently used connection. Each SQLite connection has its own page cache, so allocating recently used connections improves the performance compared to, for example, organizing the pool as a queue and returning the least recently used connection each time.