Skip to content

Commit

Permalink
fix compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
marenz2569 committed Jul 2, 2024
1 parent dd72bd3 commit dde49c7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/thread_safe_fifo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ template <typename T> class ThreadSafeFifo {

return result;
}
}
{
std::unique_lock<std::mutex> lk(mutex_);
cv_.wait_for(lk, 10ms, [&] {
if (!queue_.empty()) {
auto result = std::forward<T>(queue_.front());
Expand Down

0 comments on commit dde49c7

Please sign in to comment.