[Lldb-commits] [PATCH] D157760: [lldb] Properly protect the Communication class with reader/writer lock

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Aug 14 13:59:22 PDT 2023


JDevlieghere added inline comments.


================
Comment at: lldb/include/lldb/Core/Communication.h:172-174
   std::mutex
       m_write_mutex; ///< Don't let multiple threads write at the same time...
+  mutable std::shared_mutex m_connection_mutex;
----------------
Why do we need both? Can't we use `m_connection_mutex` in write mode instead of `m_write_mutex`?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157760/new/

https://reviews.llvm.org/D157760



More information about the lldb-commits mailing list