Release lock before notify
This commit is contained in:
parent
02ccf13c7b
commit
fc21fb643e
|
@ -242,8 +242,8 @@ void zmDbQueue::stop() {
|
||||||
std::unique_lock<std::mutex> lock(mMutex);
|
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