On Wed, Oct 06, 2010 at 08:07:00AM +0200, Michele Pradella scratched on the 
wall:
>  So let me know if I understand:
>
>   1. SQLITE_THREADSAFE=0: lock are disabled at all, and you can use
>      this if the application  is not multi thread, so if there's only
>      one thread that can use the SQLITE library
>   2. SQLITE_THREADSAFE=1: is the highest level of thread safety, so if
>      the slowest mode but you do not have to care about multiple access
>      to the SQLITE library from different thread. You need this in a
>      multi thread application to be sure to avoid damage to the DB
>   3. SQLITE_THREADSAFE=2: it's a compromise between thread safety and
>      speed. The library are thread safe but you have to avoid that two
>      thread can use at the same time the same DB connection. So if you
>      have for example 3 thread and every thread access the library with
>      it own connection there's no problem So you can use two different
>      DB connection from two thread at the same time without problem. Is
>      that right?

  As I understand it, yes, that's correct.

  Further, my understanding is that the performance difference between
  "multithread" (=2) and "serial" (=1) is very minimal on most systems,
  especially next to any physical I/O costs.

   -j

-- 
Jay A. Kreibich < J A Y  @  K R E I B I.C H >

"Intelligence is like underwear: it is important that you have it,
 but showing it to the wrong people has the tendency to make them
 feel uncomfortable." -- Angela Johnson
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to