> Le 15 août 2017 à 08:44, Clemens Ladisch <clem...@ladisch.de> a écrit : > > sanhua.zh wrote: >> All 1. 2. 3. steps are run sequentially, which means that the step 2 >> runs after step 1 finished and step 3 runs after step 2 finished >> theoretically . >> Also, I can make sure the memory order between threads. >> >> Then, is it a safe way to use sqlite connection ? > > Yes. > > Multi-threading problems are caused by multiple threads accessing the > same data at the same time. If code in multiple threads is serialized, > it is, for practical purpose, identical to single-threaded code.
Serialized accesses from multiple threads is OK when the connection is in the "Multi-thread" or "Serialized" threading modes, but not in the "Single-thread" threading mode. Have a look at https://www.sqlite.org/threadsafe.html for detailed information. Gwendal Roué _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users