System.Data.SQLite in a multithreading database

I am creating a System.Data.SQLite database in memory using the connection string as

"Data Source=:memory:", 

and want to access this database from multiple threads.

Now I have to clone the SQLiteConnection object and pass the copy to the worker threads.

But I found that different threads actually receive separate database instances in memory, not shared ones. How can I share a single database in memory among threads?

Thanks!

+4
source share
1 answer

Source: https://habr.com/ru/post/1434112/


All Articles