D. Richard Hipp wrote:
For threads within the same process, fcntl is broken by design in POSIX.
(You can clearly tell which parts of Unix were invented by Thompson
and Richie
and which parts were added later by clueless committees. Posix advisory
locks belong in the latter category.) SQLite contains a work-around to
this problem based on pthreads locks. It should be able to open
multiple connections to the same database within the same process
and use them independently and locking should work correctly. You
should not have to change anything. It should just work.
Thanks Richard, exactly what I wanted to know. So for threads only pth
locks are used - for me, great news :)
So I can safely remove my own lock and just let SQLite do it internally.
Do I need to initialize the sqlite internal pthread locks at startup ?
Or is it automatically initialized when the first sqlite3_* function is
called?
Last question, should I use for each thread its own connection now or
use one global and share it along all threads? About what I've found on
the list so far, it sound that one global connection will serialize all
threads. Is the behavior the same if each thread has its own connection
structure?
Thank you for your quick and kindly respond!
Xat
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------