On Sat, 2005-09-03 at 12:58 +0200, René Tegel wrote:
> Just for your information, i've written an multi-threaded application 
> that accesses a sqlite database (well four of them in fact). All
> threads 
> (many) use the same handle as retrieved from sqlite open.

This is not portable.  Some operating systems (ex: RedHat)
will cause intermittent problems if the same SQLite handle
is used by more than one thread. The program will seem to
work initially but will begin to exhibit unreproducible 
errors under heavy load.  This is a problem in the design
of the operating system and there is nothing that SQLite
can do to prevent it. In order to avoid these problems and
for your software to be portable, each SQLite handle must 
be used by only a single thread - specifically the thread
that opened it.  If you want to use SQLite in a multi-
threaded application, then open a separate handle for
each thread.

-- 
D. Richard Hipp <[EMAIL PROTECTED]>

Reply via email to