Make max ring buffer timeout smaller

This commit is contained in:
wheremyfoodat 2024-02-24 00:01:26 +02:00
parent 921250bcd2
commit 35b3e2b401

View file

@ -35,7 +35,6 @@ SOFTWARE.
#include <stdexcept>
namespace Common {
template <typename T, size_t BS = 1024>
class RingBuffer {
@ -56,7 +55,7 @@ namespace Common {
}
std::unique_lock<std::mutex> 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;
}