Hello everybody,

I'd like to ask a couple of silly questions before newcomers like me
get moderated. :-) I've browsed through the documentation and this
mailing list, trying to understand issues with multithreading. I'd
like if someone could confirm my conclusions.

1. As of SQLite 3.3.5, there is no multithreading (MT) problem with
the SQLite itself. All problems come from the underlying OS libraries.

2. The only MT problem is with locking the database in a case when a
thread uses sqlite3 structure created by a different thread. Thus,
using connection pool (allocated by one thread, used by other threads)
is not safe.

3. Just a thought: In case of in-memory database, no file locking is
required, so MT is no issue. (?)

Until now I've managed to avoid using DB from different threads, but
now I have no other choice but to start using the DB in a MT fashion
and I have to make my application run at least on Win32, RHEL4 and RH
7.3.

Since I'm neither a kernel hacker nor an SQLite guru, I'm quite
confused what is safe and where and when. My main question is - which
OSes suffer from the database file locking problem?

Maybe it'd be nice to have a table of OSes (their runtime libraries)
and SQLite (compile-time options/defines) and possible problems with
multithreading.

Thanks for your time.

Peter Cunderlik

Reply via email to