Is SQLite.Net thread-safe? Is SQLite.Net thread-safe? sqlite sqlite

Is SQLite.Net thread-safe?


It is not thread-safe, so you cannot share connection objects or similar across threads.

The thread bugfixes mentioned in the readme file has to do with multiple threads using multiple connections (ie. one each) to the same file, and what kind of problems or race conditions that might produce.

For instance, the thread race condition mentioned for BEGIN and BEGIN IMMEDIATE had the unfortunate effect that even though a thread issued a BEGIN, another thread that issued a BEGIN afterwards could still end up owning the database before the first one did. These types of situations have been fixed.

But database connections (oracle, sqlite, ms sql server) in .NET are not thread-safe, nor are the surrounding objects.