Sfoglia il codice sorgente

Fix missing notify on queue limit preventing thread from waking up

Paul-Louis Ageneau 1 anno fa
parent
commit
ad22ddb199
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      src/impl/queue.hpp

+ 1 - 0
src/impl/queue.hpp

@@ -105,6 +105,7 @@ template <typename T> optional<T> Queue<T>::pop() {
 	mAmount -= mAmountFunction(mQueue.front());
 	optional<T> element{std::move(mQueue.front())};
 	mQueue.pop();
+	mPushCondition.notify_one();
 	return element;
 }