Skip to content

Commit dc40726

Browse files
committed
rename cond_ to notEmpty_.
1 parent 49fd3cd commit dc40726

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

thread/BlockingQueue.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class BlockingQueue : boost::noncopyable
2424
public:
2525
BlockingQueue()
2626
: mutex_(),
27-
cond_(mutex_),
27+
notEmpty_(mutex_),
2828
queue_()
2929
{
3030
}
@@ -33,15 +33,15 @@ class BlockingQueue : boost::noncopyable
3333
{
3434
MutexLockGuard lock(mutex_);
3535
queue_.push_back(x);
36-
cond_.notify();
36+
notEmpty_.notify();
3737
}
3838

3939
T take()
4040
{
4141
MutexLockGuard lock(mutex_);
4242
while (queue_.empty())
4343
{
44-
cond_.wait();
44+
notEmpty_.wait();
4545
}
4646
assert(!queue_.empty());
4747
T front(queue_.front());
@@ -57,7 +57,7 @@ class BlockingQueue : boost::noncopyable
5757

5858
private:
5959
mutable MutexLock mutex_;
60-
Condition cond_;
60+
Condition notEmpty_;
6161
std::deque<T> queue_;
6262
};
6363

0 commit comments

Comments
 (0)