SQLite Forum

Exclusive write-only lock? (Allow only one process read-write, and multiple read-only)
Login
I could see adding a mode where a connection says that basically it ALWAYS wants to hold a write lock on the database, and anyone else attempting to get one should get a "busy" return, and when that connection does a commit, it atomically gets back the write lock.

I don't know enough details about how SQLite does this to know if it is actually possible or feasible. It would have to be done in a way that if that app crashes (or doesn't close properly) that the lock goes away.

It also is definitely an 'edge' case, and might not be really worth adding.