On Wed, Jul 26, 2006 at 02:32:58PM +0000, [EMAIL PROTECTED] wrote:
> It has been suggested that I add a mutex to every SQLite
> database connection.  This would cause access to a database
> connection to automatically serialize even when two or more
> threads try to use that connection at once, thus preventing
> problems such as the above.
> 
> The downside is the (minimal) additional overhead of acquiring 
> and releasing a mutex on each API call.  There will also be 
> some changes to the OS-layer backend which will break 
> private ports to unusual OSes.

I'm -0 on this.  For monotone, we ship sqlite in our source package
(to avoid version skew), but do not otherwise use threads.  I think
this would mean we had to change our build/configury to figure out how
the local thread library worked for sqlite alone, and for no gain to
us (perhaps even a speed loss -- mutexes used by libc already show up
surprisingly high on our profiles).

-- Nathaniel

-- 
The Universe may  /  Be as large as they say
But it wouldn't be missed  /  If it didn't exist.
  -- Piet Hein

Reply via email to