Safer pop location

This commit is contained in:
Jack Andersen 2016-04-10 23:35:43 -10:00
parent 6945ec94b8
commit 4da14b5d9b
1 changed files with 1 additions and 1 deletions

View File

@ -71,11 +71,11 @@ void ClientProcess::Worker::proc()
while (m_proc.m_pendingQueue.size())
{
std::unique_ptr<Transaction> trans = std::move(m_proc.m_pendingQueue.front());
m_proc.m_pendingQueue.pop_front();
lk.unlock();
trans->run(m_blendTok);
lk.lock();
m_proc.m_completedQueue.push_back(std::move(trans));
m_proc.m_pendingQueue.pop_front();
}
m_proc.m_waitCv.notify_one();
if (!m_proc.m_running)