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

Categories

0 votes
342 views
in Technique[技术] by (71.8m points)

c++ - Problem in threading in QT

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

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

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...