Skip to content

Commit 926d2ba

Browse files
committed
fix variable name
1 parent 3fbd8a4 commit 926d2ba

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/consumer_queue.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ consumer_queue::~consumer_queue() {
2323

2424
void 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
}

src/consumer_queue.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)