Release lock before notify
This commit is contained in:
parent
484827bdeb
commit
bdb9acc0fe
|
@ -237,8 +237,12 @@ zmDbQueue::~zmDbQueue() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void zmDbQueue::stop() {
|
void zmDbQueue::stop() {
|
||||||
|
{
|
||||||
|
std::unique_lock<std::mutex> lock(mMutex);
|
||||||
mTerminate = true;
|
mTerminate = true;
|
||||||
|
}
|
||||||
mCondition.notify_all();
|
mCondition.notify_all();
|
||||||
|
|
||||||
if (mThread.joinable()) mThread.join();
|
if (mThread.joinable()) mThread.join();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue