Browse Source

fx

pull/289/head
lizzie 3 months ago
parent
commit
640d5ba46e
  1. 6
      src/common/bounded_threadsafe_queue.h

6
src/common/bounded_threadsafe_queue.h

@ -117,9 +117,9 @@ private:
});
} else if constexpr (Mode == PopMode::WaitWithStopToken) {
// Wait until the queue is not empty.
std::unique_lock lock{consumer_cv_mutex};
consumer_cv.wait(lock, stop_token, [this, read_index] {
return read_index != m_write_index.load(std::memory_order::acquire);
std::unique_lock lock{consumer.cv_mutex};
consumer.cv.wait(lock, stop_token, [this, read_index] {
return read_index != producer.index.load(std::memory_order::acquire);
});
if (stop_token.stop_requested()) {
return false;

Loading…
Cancel
Save