* [EMAIL PROTECTED] <[EMAIL PROTECTED]> [2006-07-26 16:40]:
> It has been suggested that I add a mutex to every SQLite
> database connection.

Client code can easily use trivial wrappers to supply such
serialisation for itself, though.

> The downside is the (minimal) additional overhead of acquiring
> and releasing a mutex on each API call.

I don’t see this is a factor. A platform with threads is by
definition not starved for CPU cycles.

> There will also be some changes to the OS-layer backend which
> will break private ports to unusual OSes.

This is a big deal IMO.

An idea worth pursuing might be not to implement such thread
serialisation natively in SQLite itself, but to merely add a way
for client code to supply the address of a callback to be called
called at the appropriate time in each relevant function, so that
API clients can implement serialisation on their own through
whichever means they choose.

If that doesn’t seem like a good idea and you’d prefer a deeper
change that implements native thread serialisation, I’d suggest
to merely earmark that for a time when a backend interface change
is unavoidable anyway, and revisit it then.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

Reply via email to