Unverified Commit 300b2e65 authored by Dimitri Fontaine's avatar Dimitri Fontaine
Browse files

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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment