Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have a problem in threading in qt. my application create several databases. i've been uses QSQLITE. when i run my app. thread one start and work successfully then when thread one on working, thread two start for creating another DB. but it's error on QSQLDriver. I've been used QMutex or QMutexLocker, but problem still remain.

Please help me.

Thanks

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
323 views
Welcome To Ask or Share your Answers For Others

1 Answer

The problem is likely that you're using the same connection from different threads, which, even without a race condition, some drivers might not like.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...