Avoid un necessary move when popping circular_q

This commit is contained in:
gabime
2019-09-17 11:56:17 +03:00
parent 2ddd6895e1
commit d52cf87d71
4 changed files with 21 additions and 13 deletions

View File

@@ -59,7 +59,8 @@ public:
{
return false;
}
q_.pop_front(popped_item);
popped_item = std::move(q_.front());
q_.pop_front();
}
pop_cv_.notify_one();
return true;