I'm getting asserts of Fetch and Execute methods, sometimes. I don't know how to avoid them, but threads are really needed.
Some info about task:
- Console application.
- Main loop of program - RPC-server, with functions for user (each of functions use SQLite database, through global SQL)
- Threads registers incoming hardware events and writes them into the SQLite database.
How can I make this task threadsafe?
I would say that you should serialize (using Mutex) any access to global SQL - including creation of Sql cursors (where SQL is default parameter). I hope that would save the problem.