From dde49c79c30dfd76a414f3dabf4b4d4ee297c0d1 Mon Sep 17 00:00:00 2001 From: Markus Schmidl Date: Wed, 3 Jul 2024 00:27:41 +0200 Subject: [PATCH] fix compile error --- include/thread_safe_fifo.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/thread_safe_fifo.hpp b/include/thread_safe_fifo.hpp index 41a47bc..285d0c8 100644 --- a/include/thread_safe_fifo.hpp +++ b/include/thread_safe_fifo.hpp @@ -41,6 +41,9 @@ template class ThreadSafeFifo { return result; } + } + { + std::unique_lock lk(mutex_); cv_.wait_for(lk, 10ms, [&] { if (!queue_.empty()) { auto result = std::forward(queue_.front());