renamed a member variable
This commit is contained in:
parent
5e6ba3666e
commit
1e08996087
|
|
@ -38,7 +38,7 @@ public:
|
||||||
: participants_(participants) {}
|
: participants_(participants) {}
|
||||||
|
|
||||||
void arrive_and_wait() {
|
void arrive_and_wait() {
|
||||||
std::unique_lock<std::mutex> lock(m_);
|
std::unique_lock lock(mutex_);
|
||||||
++arrived_;
|
++arrived_;
|
||||||
if (arrived_ >= participants_) {
|
if (arrived_ >= participants_) {
|
||||||
open_ = true;
|
open_ = true;
|
||||||
|
|
@ -49,7 +49,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::mutex m_;
|
std::mutex mutex_;
|
||||||
std::condition_variable cv_;
|
std::condition_variable cv_;
|
||||||
int participants_{0};
|
int participants_{0};
|
||||||
int arrived_{0};
|
int arrived_{0};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue