sqlite multithreading for single-thread mode with multiple databases
Option 1. If you want Option 2, you need to use multi-thread mode, exactly as the text says. In single-threaded mode, the global state of the sqlite functions will not be protected, and using them simultaneously in multiple threads will be a problem.
With Multi-thread mode, you can use sqlite in multiple threads in the same application, but you may not share a single connection between threads simultaneously.