This commit is contained in:
parent
f33d8ff308
commit
0b9da62833
@ -290,8 +290,7 @@ void ring_buffer_base::reader_thread() {
|
||||
next_chunk = ring_begin_;
|
||||
}
|
||||
|
||||
const auto check_and_wait = [this, &chunk_lock, &last_pos, &next_chunk,
|
||||
¬ify_and_unlock]() {
|
||||
if (read_state_[next_chunk % read_state_.size()]) {
|
||||
if (get_stop_requested()) {
|
||||
notify_and_unlock();
|
||||
return;
|
||||
@ -304,10 +303,6 @@ void ring_buffer_base::reader_thread() {
|
||||
}
|
||||
|
||||
notify_and_unlock();
|
||||
};
|
||||
|
||||
if (read_state_[next_chunk % read_state_.size()]) {
|
||||
check_and_wait();
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user