You should at least sleep a little bit in the callback to give the writer thread a chance at actually doing something other than fighting for control of a cpu. The SQLite standard busy handler sleeps progressively longer the more often it gets called for a specific operation until the maximum retry timeout is reached.