File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ consumer_queue::~consumer_queue() {
2323
2424void consumer_queue::push_sample (const sample_p &sample) {
2525 // acquire lock for more predictable behavior in regards to pop_sample()
26- std::unique_lock<std::mutex> lk (lock_ );
26+ std::unique_lock<std::mutex> lk (mut_ );
2727 while (!buffer_.push (sample)) {
2828 sample_p dummy;
2929 buffer_.pop (dummy);
@@ -37,8 +37,8 @@ sample_p consumer_queue::pop_sample(double timeout) {
3737 buffer_.pop (result);
3838 } else {
3939 if (!buffer_.pop (result)) {
40- // wait untill for a new sample until the thread calling push_sample delivers one, or until timeout
41- std::unique_lock<std::mutex> lk (lock_ );
40+ // wait for a new sample until the thread calling push_sample delivers one, or until timeout
41+ std::unique_lock<std::mutex> lk (mut_ );
4242 std::chrono::duration<double > sec (timeout);
4343 cv_.wait_for (lk, sec, [&]{ return this ->buffer_ .pop (result); });
4444 }
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ class consumer_queue {
5555 send_buffer_p registry_; // optional consumer registry
5656 buffer_type buffer_; // the sample buffer
5757 // used to wait for new samples
58- std::mutex lock_ ;
58+ std::mutex mut_ ;
5959 std::condition_variable cv_;
6060};
6161
You can’t perform that action at this time.
0 commit comments