Re: [sqlite] implementing busy_handler callback

2006-08-23 Thread John Stanton
I would endorse that. It makes the logic simpler and execution more efficient compared with the various polling strategies used to look at file locks. It is particularly the case if you multi-use is due to threading in a single process. Ritesh Kapoor wrote: I think a good way of using sqlit

Re: [sqlite] implementing busy_handler callback

2006-08-23 Thread Jay Sprenkle
On 8/22/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Hi All, I am trying to integrate SQLite in a multithreaded C++ application which runs on Linux. I have gone through the SQLIte documentation, but it's not clear whether the sqlite3_exec() will retry the query when the busy handler callbac

Re: [sqlite] implementing busy_handler callback

2006-08-22 Thread Ritesh Kapoor
I think a good way of using sqlite in a multithreaded app is to have your own mutex lock for the DB. Everytime you need to execute a query just call the lock() function for your mutex and then proceed with sqlite3_exec() calls. Followed by a unlock() call. Your mutex wouldn't return if the anoth