File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ namespace disruptor4cpp
4343 class count_down_latch
4444 {
4545 public:
46- explicit count_down_latch (std:: size_t count)
46+ explicit count_down_latch (int count)
4747 : count_(count)
4848 {
4949 }
@@ -62,13 +62,13 @@ namespace disruptor4cpp
6262 bool wait (const std::chrono::duration<Rep, Period>& timeout)
6363 {
6464 std::unique_lock<std::mutex> lock (mutex_);
65- return condition_.wait_for (lock, timeout, [this ] { return count_ = = 0 ; });
65+ return condition_.wait_for (lock, timeout, [this ] { return count_ < = 0 ; });
6666 }
6767
6868 void count_down ()
6969 {
7070 std::lock_guard<std::mutex> lock (mutex_);
71- if (--count_ = = 0 )
71+ if (--count_ < = 0 )
7272 condition_.notify_all ();
7373 }
7474
@@ -80,7 +80,7 @@ namespace disruptor4cpp
8080
8181 std::mutex mutex_;
8282 std::condition_variable condition_;
83- std:: size_t count_;
83+ int count_;
8484 };
8585 }
8686}
You can’t perform that action at this time.
0 commit comments