Merge pull request #3441 from peat-psuwit/for-upstream/dbqueue-stop-mutex
db: fix dead lock in zmDbQueue::stop()
This commit is contained in:
commit
f4412c81d1
|
@ -238,8 +238,13 @@ zmDbQueue::~zmDbQueue() {
|
|||
}
|
||||
|
||||
void zmDbQueue::stop() {
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(mMutex);
|
||||
|
||||
mTerminate = true;
|
||||
mCondition.notify_all();
|
||||
}
|
||||
|
||||
if (mThread.joinable()) mThread.join();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue