多线程时出现如下警告信息:
A mutex must be unlocked in the same thread that locked it;
原因可能有二:
1.创建QMutex不在当前线程;
2.QWaitCondition::wait 调用前没有调用QMutex::lock;
解决方法:
1.在run函数中创建QMutex;
...
m_pMutex = new QMutex();
...
2.wait前调用lock:
QMutexLocker locker(m_pMutex);
m_waitCond.wait(m_pMutex);
https://blog.csdn.net/lanhy999/article/details/8657359