On 26 March 2017 at 14:17, Keith Medcalf <kmedc...@dessus.com> wrote:
> If you do not specify your own custom busy handler (to display flying ball > bearings, etc, or do your own exponential sleeping, etc) then the default > busy_handler is used. The default busy handler does its own exponential > backoff algorithm but does not display whirling ball bearings or anything > else, it just sleeps silently. Nitpick: the "default" busy_handler is in fact not used by default. That is, if you open a connection and don't specify a busy handler or timeout then you will get SQLITE_BUSY returned immediately if a lock cannot be acquired. There are essentially three busy handler states: (1) Normal settings: no busy handler is active (2) sqlite3_busy_timeout()/PRAGMA timeout invoked: a sleep() with exponential backoff busy handler is used (3) sqlite3_busy_handler() invoked: the user defined busy handler is used Sqlite implements the timeout feature by installing a busy_handler behind the scenes (which is called the "default" busy handler in the code). There's only one busy_handler per connection though, so whichever is called last out of sqlite3_busy_handler() or sqlite3_busy_timeout() will take precedence. -Rowan _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users