Protect SQLite concurrent write access with a semaphore.
SQLite has not been designed for write-write concurrency, so implement a critical section in our code so that SQLite only sees a single write at all time. It may still see multiple readers though. Because we have re-entrant queries (an SQLite iterator function may then choose to run another SQLite query), this commit also adds support for re-entrant semaphore in a way that doesn't call into semop(2) again when we already are in the critical section.
parent
1bb66f0d
Please register or sign in to comment