> And that explanation along with why one would want to use each mode would be
> quite helpful to the community I would think.
>From examining the source I see that it the serialization is via the mutex
>attached to the database connection. Serialization of statements is achieved
>by reference
And that explanation along with why one would want to use each mode would be
quite helpful to the community I would think.
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOINT Solutions Operating Unit
Northrop Grumman Information Systems
> Multi-thread -- one sqlite3 object per thread is required -- no sharing of
> prepared statements or anything else.
This is not true. Sharing of prepared statements and sqlite3 object is
allowed in this mode as long as any access to them is protected by
mutex or any other synchronization
This seems to fly in thte face of what I remember reading on here before. Can
we get a clear explanation of what to do with the different THREADSAFE
settings? I think it's implied...
i.e. (assumign this is correct)
Single-thread -- no threading allowed at all
Multi-thread -- one sqlite3
> How to write and read the same sqlite3 DB in memory concurrently in two
> thread?
You need to use one connection (sqlite3 object) and not to use
SQLITE_OPEN_NOMUTEX flag (assuming you used default SQLite compilation
options) or protect access to sqlite3 object with your own mutex.
Pavel
On
Now I am writing datas to sqlite3 DB in memory(":memory:") in a thread .
And concurrently I want to read the datas of the same DB in memory too.
but While i used the same object of sqlite3 to write and read, i had got the
error:SQLITE_MISUSE.
If i use the different objects of sqlite3 to write and
6 matches
Mail list logo