> On Jan 4, 2018, at 4:51 PM, Ron Barnes <rbar...@njdevils.net> wrote: > > I hope not since I use synclock in my code when ever a thread is attempting a > write to the database. That seems like the only issue from that page that I > may be doing. I could have up to 30 or more threads reading from the DB but > only one to three active threads writing.
It depends on the value of SQLITE_THREADSAFE that SQLite was compiled with. (Check the docs for details.) If it’s set to 1, you can do what you’re doing. Otherwise, you cannot use a single SQLite connection on multiple threads without using your own mutex (if it’s 2), or at all (if it’s 0). 30 threads sounds like overkill, BTW. Generally the appropriate number is equal to the number of CPU cores. And if the task is I/O-bound there’s not much benefit to having more than one since only one of them can be inside SQLite at a time. —Jens _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users