Richard, I believe his problem is this:
"Each query is allowed to complete before the other one starts, but each thread may have multiple statements or result sets open." The open resultsets/multiple started statements are causing him headaches. Mike -----Ursprüngliche Nachricht----- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Gesendet: Samstag, 30. Dezember 2006 17:32 An: sqlite-users@sqlite.org Betreff: Re: [sqlite] sqlite performance, locking & threading "Emerson Clarke" <[EMAIL PROTECTED]> wrote: > Richard, > > Are you sure we are not just getting into semantic knots here ? > > Do we have the same definition of "at the same time". I mean > concurrently, so that both threads use the same sqlite3 * structure, > within mutexes. Each query is allowed to complete before the other one > starts, but each thread may have multiple statements or result sets > open. > > When i try to do this, i get api called out of sequence errors... > There are around 50 test cases for this kind of behavior in the regression test files thread1.test and thread2.test. They all seem to work for me. Perhaps your mutexes are not working as you expect and you are in fact trying to use the same database connection simultaneously in two or more threads. SQLite attempts to detect this situation and when it sees it it return SQLITE_MISUSE which generates the "API called out of sequence" error. -- D. Richard Hipp <[EMAIL PROTECTED]> ---------------------------------------------------------------------------- - To unsubscribe, send email to [EMAIL PROTECTED] ---------------------------------------------------------------------------- - ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------