2 ms·
I don't understand, all writes to a single sqlite DB are going to be serialized no matter what you do. > Basically, it adds its own write lock outside of SQLit
by bawolff 1y ago
I don't understand, all writes to a single sqlite DB are going to be serialized no matter what you do.
> Basically, it adds its own write lock outside of SQLite, because the pool can implement the lock in a less annoying way.
Less annoying how? What is the difference?
- pornel 1y agoSQLite's lock is blocking, with a timeout that aborts the transaction. An async runtime can have a non-blocking lock that allows other tasks to proceed in the meantime, and is able to wait indefinitely without breaking transactions.
- bawolff 1y agoWhat's the benefit of this over just doing PRAGMA busy_timeout = 0; to make it non-blocking ? After all, as far as i understand, the busy timeout is only going to occur at the beginning of a write transaction, so its not like you have to redo a bunch of queries.