On 5/13/2014 9:12 AM, d b wrote:
My application is multithreaded. It maintains only connection per application. Database accessed by single process only. ThreadA will do database write operations(bulk) in a transaction. ThreadB will do single write operation without transaction but same connection pointer.
Transaction is a property of a connection, not a thread. If ThreadA started an explicit transaction on a connection, then writes by ThreadB on the same connection will also become part of that transaction.
Here, application needs to synchronize the calls among threads by using synchronization technique(critical_section/mutex)? (OR) begin transaction and commit will synchronize the calls between threads?
Individual sqlite3_* API calls on a given connection are serialized by SQLite: each call locks a mutex associated with the connection on entry, and unlocks it right before returning. If you need more synchronization than that, you would have to provide it yourself.
_______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users