esp32_arduino_sqlite3_lib icon indicating copy to clipboard operation
esp32_arduino_sqlite3_lib copied to clipboard

Working with simultaneous actions

Open Zhu-jiatong opened this issue 2 years ago • 2 comments

I am using this library with a webserver for storing and accessing user data. In most cases, there will be no issues.

However, when there is a write operation to the database while a read is being performed on it, what will happen? What about 2 writes at the same time?

I saw that on the sqlite documentation, different threadsafe options are offered both during compile time and runtime. So, according to this document, I may use Multi-thread mode to allow a database to be used simultaneously by multiple connections. Alternatively, I may also use Serialized mode to force all operations into sequential order.

I would like to know if the above informatin is valid, and that whether I can use the library safely in such cases. Thank you.

*If any further clarifications are required, please let me know.

Zhu-jiatong avatar Mar 13 '23 06:03 Zhu-jiatong