Initial implementation of CountDownLatch

PiperOrigin-RevId: 394478506
This commit is contained in:
jfcarroll
2021-09-02 09:28:30 -07:00
committed by Copybara-Service
parent e721faca4c
commit 17676ac999
9 changed files with 302 additions and 65 deletions
+9 -7
View File
@@ -49,14 +49,16 @@ class Mutex : public api::Mutex {
private:
Mutex::Mode mode_;
bool locked_ = false;
std::mutex mutex_actual_;
std::mutex& mutex_ = mutex_actual_;
std::recursive_mutex recursive_mutex_actual_;
std::recursive_mutex& recursive_mutex_ = recursive_mutex_actual_;
std::thread::id owning_thread_;
CRITICAL_SECTION critical_section_;
std::mutex mutex_impl_; // The actual mutex allocation
std::mutex& mutex_ =
mutex_impl_; // This is passed to other windows functions, must be by
// reference to avoid ownership problems
std::recursive_mutex recursive_mutex_impl_; // The actual mutex allocation
std::recursive_mutex& recursive_mutex_ =
recursive_mutex_impl_; // This is passed to other windows functions,
// must be by reference to avoid ownership
// problems
};
} // namespace windows