Hi Team,
Is this sqlite3_exec() function is a blocking call in the case of writing.I 
have two thread one is for reading and other is for writing the DB. Both thread 
have the same DB connection(Of course i am in FULLMUTEX mode and sqlite point 
of few there is no multiple thread every thing is serialized). Reader thread 
starts first and continuously reading 500 records from a table (I kept the 
sqlite3_exec() function call inside a loop for continues reading ie, on one 
iteration it will print 500 records and it is printing successfully using 
callback function). After 1sec of delay writer thread starts its execution and 
tries to write 500 records into the same table,Because of the small loop 
iteration gap in the reader thread the writer will get a chance to update the 
table hence my reader thread is blocked may be the mutex on the sqlite3* is 
acquired by the writer thread. After around 45 sec reader start its operation 
but one thing i observed is that the newly added entry is not printing
  instead of that old data is printing so i increased the reader thread looping 
iteration. After few iteration is over the newly added records also printing 
along with the old data. Why this delay is happening? (even though the writer 
thread is not coming out from the sqlite3_exec which i used to write the data 
but after a few sec its came out at that time onward i am getting the updated 
data). Along with the INSERT sql statement i am not using any BEGIN TRANSACTION 
and COMMIT. 
Please give a suggestion for this.

Thank you
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to