I believe at least when you use sqlite3_prepare_v2/sqlite3_step/sqlite3_finalize yourself and set busy_timeout to 0 you will get SQLITE_BUSY every time you try to call sqlite3_step and database is locked. So after receiving this return code you can do whatever you want, even queue your statements somewhere to try them in a few seconds.
Pavel On Fri, Mar 5, 2010 at 9:37 AM, Kurt D. Knudsen <[email protected]> wrote: > I'm writing an application that uses an SQLite DB to maintain a list of > hashes that mutliple threads access at random times. Is there a way to > queue sqlite3_exec() statements to locked databases or a way to check if > a database is locked so I can retry every few seconds? > > Thanks, > > Kurt > _______________________________________________ > sqlite-users mailing list > [email protected] > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

