> i understand that one "commit" will block all other threads from doing a > "commit", "rollback" or any atomic transaction, until it's done, but are you > saying i can't even add data on another thread while one has an open > transaction?
There can be several simultaneous read-only transactions. But as long as one connection started a writing transaction (by executing "begin immediate" or by executing insert/update/delete after "begin") no other connection can start a writing transaction (it still can do read-only transactions for a while). If you need a different behavior you need to use some other DBMS. Pavel On Sat, Feb 5, 2011 at 5:48 PM, David M. Cotter <m...@davecotter.com> wrote: >> Transactions are per-connection and have nothing to do >> with threads. If you want different transactions in each thread you >> need to make one connection for each thread. But those transactions >> won't be able to execute simultaneously. > > so if i open a separate connection on each thread > then each thread begins a transaction > you're saying one thread will block? > > i understand that one "commit" will block all other threads from doing a > "commit", "rollback" or any atomic transaction, until it's done, but are you > saying i can't even add data on another thread while one has an open > transaction? > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users