Hi, We have a multi-threaded application (I know "threads are evil", but this is a small server application). Each thread tries to access the SQLite database. When trying to get a DB handle (sqlite3_open), if it returns SQLITE_BUSY, then the thread will wait for some time and try to open it again (until it gets the handle). In our case, two threads are running, one thread is preparing an "INSERT" statement (It returns SQLITE_OK), then it is executed using sqlite3_step. sqlite3_step returns an SQLITE_BUSY! Is there any possibility for this? ( I think these two threads are obtaining the DB handle at the same time using sqlite_open - with wrtie permission- is it possible?) I have tried compiling the application with both -DSQLITE_THREADSAFE=2 and -DSQLITE_THREADSAFE=1.
Any hint would be very helpful... Thanks a lot, Lloyd ______________________________________ Scanned and protected by Email scanner _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users