Expand description
Single-threaded native SQLite command worker. Runs each database’s SQLite commands on a shared pool of plain OS threads.
Every database is a serial queue: at most one pool thread holds its connection at a time,
runs one command, and requeues the database if more work is waiting. A connection with an
open explicit transaction stays with its database between commands and holds no thread.
Pool threads must be plain OS threads, never Tokio workers, because VFS callbacks block on
the Tokio runtime with block_on and sleep with std::thread::sleep.
Structs§
- Sqlite
Pool - A bounded pool of plain OS threads shared by every database of one runtime process. The pool spawns threads lazily, up to its cap, only when no thread is free. Cloning shares the pool; it shuts down once the owner and every database handle have dropped their clones.
- Sqlite
Worker Close Timeout Error - Sqlite
Worker Closing Error - Sqlite
Worker Dead Error - Sqlite
Worker Fatal Error - Sqlite
Worker Handle - Sqlite
Worker Overloaded Error - Sqlite
Worker Result
Constants§
- DEFAULT_
SQLITE_ WORKER_ THREADS - SQLITE_
WORKER_ QUEUE_ CAPACITY - SQLITE_
WORKER_ THREADS_ ENV - Environment variable that sizes the process pool.
Traits§
- Sqlite
Pool Metrics - Process-level pool gauges. Implemented by the runtime that owns the pool.