Hi,I looked at a few of the multithreading docs and posts and it looks like
SQLite3 supports reads and writes from multiple threads provided SQLite3 is
compile with THREADSAFE option. In this case each thread has it own DB
connection. My question is if I have a single DB connection which is used by
multiple threads then are simultaneous reads and writes supported from these
threads. I understand writes will lock the DB but other than this will this
work. Basically are there issues if a read is happening on the DB connection
can another read happen in the same DB connection from another thread. On
the same thread this is not an issue. I was wondering whether there could be
issues when doing from multiple threads.The reason I am sharing a single
connection with multiple threads is because I need to listen to the DB
change notification. Currently SQLite3 supports listening to notifications
from a single connection only. For this reason I am maintaining a single
connection shared by multiple threads.ThanksPrashant



--
View this message in context: 
http://sqlite.1065341.n5.nabble.com/Multiple-reads-and-writes-to-a-single-DB-connection-from-multiple-threads-tp75972.html
Sent from the SQLite mailing list archive at Nabble.com.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to