This commit is contained in:
parent
f33d8ff308
commit
0b9da62833
@ -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()]) {
|
||||||
¬ify_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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user