================ @@ -1692,6 +1692,21 @@ class Target : public std::enable_shared_from_this<Target>, } }; +/// The private implementation backing SBLock. +class APILock { +public: + APILock(std::shared_ptr<std::recursive_mutex> mutex_sp) + : m_mutex(std::move(mutex_sp)), m_lock(*m_mutex) {} + + void Unlock() { m_lock.unlock(); } + + operator bool() const { return static_cast<bool>(m_lock); } + ---------------- labath wrote:
What would you say to removing these, and having SBLock::Unlock do its work by clearing the unique_ptr ? https://github.com/llvm/llvm-project/pull/131404 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits