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