How to properly call SQLite functions from background thread on iPhone?

前端 未结 8 2018
礼貌的吻别
礼貌的吻别 2020-12-29 15:10

I\'m using an SQLite database in my iPhone app. At startup, there are some database actions that I want to perform in a separate thread. (I\'m doing this mainly to minimize

8条回答
  •  暖寄归人
    2020-12-29 15:59

    SQLite handles (sqlite3_stmt * for sure, and sqlite3 * I think) are thread-specific. The correct way to call them from multiple threads is to maintain a separate set of handles for each thread.

提交回复
热议问题