I'm having some problems with multi-threaded updates failing...

(snip)...the best place to start from to get your program up and running is to wrap your
updates inside "BEGIN IMMEDIATE" or "BEGIN EXCLUSIVE" transaction

Many thanks for your detailed reply.

I tried BEGIN IMMEDIATE, but all that happens is that I get occasional "database is busy" errors on that statement rather than my original INSERT. The busy handler just doesn't seem to get invoked. I just want to submit a query and have sqlite keep trying until my timeout has expired.

Of course I could implement this in the application code, but I'd rather understand why sqlite isn't able to do this first. The sqlite source is unfamiliar territory, but I'll have a poke around and try to trace how the busy callback is used.


Reply via email to