当前位置: 代码迷 >> QT开发 >> sqlite 多线程编程解决思路
  详细解决方案

sqlite 多线程编程解决思路

热度:64   发布时间:2016-04-25 03:44:55.0
sqlite 多线程编程
Qt下sqlite如何进行多线程编程,如何避免数据库死锁。
SQLite Qt

------解决方案--------------------
Qt的数据连接不支持跨线程使用
在Assistant检索Thread-Support in Qt Modules
第一段话
Threads and the SQL Module

A connection can only be used from within the thread that created it. Moving connections between threads or creating queries from a different thread is not supported.

In addition, the third party libraries used by the QSqlDrivers can impose further restrictions on using the SQL Module in a multithreaded program. Consult the manual of your database client for more information
------解决方案--------------------
对跨线程的数据读写,主动加锁保护。
  相关解决方案