diff --git a/lldb/source/Target/ThreadList.cpp b/lldb/source/Target/ThreadList.cpp --- a/lldb/source/Target/ThreadList.cpp +++ b/lldb/source/Target/ThreadList.cpp @@ -736,7 +736,7 @@ if (this != &rhs) { // Lock both mutexes to make sure neither side changes anyone on us while // the assignment occurs - std::lock_guard guard(GetMutex()); + std::scoped_lock guard(GetMutex(), rhs.GetMutex()); m_process = rhs.m_process; m_stop_id = rhs.m_stop_id;