diff options
author | Dmitry Vyukov <dvyukov@google.com> | 2023-10-27 06:34:24 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-10-27 06:35:17 -0700 |
commit | 89d2caa104563ad8c2182282f5d4676f6747bd0e (patch) | |
tree | 6459f3877e4aa1ab75946529cfafcafe4f02f966 /absl/synchronization/mutex.h | |
parent | cdb1e7f4a60a6d0ee038f733776356a50121265a (diff) | |
download | abseil-89d2caa104563ad8c2182282f5d4676f6747bd0e.tar.gz abseil-89d2caa104563ad8c2182282f5d4676f6747bd0e.tar.bz2 abseil-89d2caa104563ad8c2182282f5d4676f6747bd0e.zip |
Rollback "Mutex: Remove destructor in release build"
PiperOrigin-RevId: 577180526
Change-Id: Iec53709456805ca8dc5327669cc0f6c95825d0e9
Diffstat (limited to 'absl/synchronization/mutex.h')
-rw-r--r-- | absl/synchronization/mutex.h | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/absl/synchronization/mutex.h b/absl/synchronization/mutex.h index d8264c03..95726f6b 100644 --- a/absl/synchronization/mutex.h +++ b/absl/synchronization/mutex.h @@ -536,7 +536,6 @@ class ABSL_LOCKABLE Mutex { void Block(base_internal::PerThreadSynch* s); // Wake a thread; return successor. base_internal::PerThreadSynch* Wakeup(base_internal::PerThreadSynch* w); - void Dtor(); friend class CondVar; // for access to Trans()/Fer(). void Trans(MuHow how); // used for CondVar->Mutex transfer @@ -910,6 +909,7 @@ class CondVar { // A `CondVar` allocated on the heap or on the stack can use the this // constructor. CondVar(); + ~CondVar(); // CondVar::Wait() // @@ -1061,15 +1061,6 @@ inline Mutex::Mutex() : mu_(0) { inline constexpr Mutex::Mutex(absl::ConstInitType) : mu_(0) {} -#if !defined(__APPLE__) && !defined(ABSL_BUILD_DLL) -inline Mutex::~Mutex() { Dtor(); } -#endif - -#if defined(NDEBUG) && !defined(ABSL_HAVE_THREAD_SANITIZER) -// Use default (empty) destructor in release build for performance reasons. -inline void Mutex::Dtor() {} -#endif - inline CondVar::CondVar() : cv_(0) {} // static |