refactor
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good

This commit is contained in:
Scott E. Graves 2025-02-21 20:00:37 -06:00
parent f33d8ff308
commit 0b9da62833

View File

@ -290,8 +290,7 @@ void ring_buffer_base::reader_thread() {
next_chunk = ring_begin_; next_chunk = ring_begin_;
} }
const auto check_and_wait = [this, &chunk_lock, &last_pos, &next_chunk, if (read_state_[next_chunk % read_state_.size()]) {
&notify_and_unlock]() {
if (get_stop_requested()) { if (get_stop_requested()) {
notify_and_unlock(); notify_and_unlock();
return; return;
@ -304,10 +303,6 @@ void ring_buffer_base::reader_thread() {
} }
notify_and_unlock(); notify_and_unlock();
};
if (read_state_[next_chunk % read_state_.size()]) {
check_and_wait();
continue; continue;
} }