Alexander Spence wrote: > > (I'm the one that filed the Sqlite Backup API Ticket.. Actually just merged > that code in and found the access violations.) >
Are you using the new backup API support in the latest System.Data.SQLite release or some custom code? > > Your fix looks a lot better than global mutexes. If you don't mind explaining > since it's not obvious to me, what caused the race condition? > Thread 1 could be in the SQLite3.Close method, calling the SQLiteBase.ResetConnection method. Thread 2 could be in a GC thread, calling Dispose on the SQLiteConnectionHandle object, which ends up calling SQLiteConnectionHandle.ReleaseHandle, which calls SQLiteBase.CloseConnection (i.e. this has the potential to pull the rug out from under the SQLiteBase.ResetConnection method in the other thread). -- Joe Mistachkin _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users