3 ms·
Create a connection per task. WAL is probably a good idea. Even using SERIALIZED mode, sqlite has multiple APIs which are completely broken if two clients touc
by masklinn 3y ago
Create a connection per task. WAL is probably a good idea.
Even using SERIALIZED mode, sqlite has multiple APIs which are completely broken if two clients touch the same connection (https://github.com/rusqlite/rusqlite/issues/342#issuecomment-592624109 https://github.com/rusqlite/rusqlite/issues/342#issuecomment...).
Don't bother, just don't share connections between threads and use the regular multi-thread mode (do use that though).
You can use a connection pool and move connections from task to task (and thread to thread), just not use connections concurrently.