From 35b3e2b401e909c366029f43defa3290a916579c Mon Sep 17 00:00:00 2001 From: wheremyfoodat <44909372+wheremyfoodat@users.noreply.github.com> Date: Sat, 24 Feb 2024 00:01:26 +0200 Subject: [PATCH] Make max ring buffer timeout smaller --- include/ring_buffer.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/ring_buffer.hpp b/include/ring_buffer.hpp index 00b1ab41..29112371 100644 --- a/include/ring_buffer.hpp +++ b/include/ring_buffer.hpp @@ -35,7 +35,6 @@ SOFTWARE. #include namespace Common { - template class RingBuffer { @@ -56,7 +55,7 @@ namespace Common { } std::unique_lock l(m_mu); using namespace std::chrono_literals; - bool safe = m_cv.wait_for(l, 20ms, [this, N]() -> bool { return N < availableLocked(); }); + bool safe = m_cv.wait_for(l, 5ms, [this, N]() -> bool { return N < availableLocked(); }); if (safe) enqueueSafe(data, N); return safe; }