[Lldb-commits] [PATCH] D125073: [lldb-vscode] Fix data race in lldb-vscode when running with ThreadSanitizer
Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue May 17 09:11:56 PDT 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rGbe738c9d1c16: [lldb-vscode] Fix data race in lldb-vscode when running with ThreadSanitizer (authored by Walter Erquinigo <wallace at fb.com>).
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125073/new/
https://reviews.llvm.org/D125073
Files:
lldb/tools/lldb-vscode/ProgressEvent.h
Index: lldb/tools/lldb-vscode/ProgressEvent.h
===================================================================
--- lldb/tools/lldb-vscode/ProgressEvent.h
+++ lldb/tools/lldb-vscode/ProgressEvent.h
@@ -6,6 +6,7 @@
//
//===----------------------------------------------------------------------===//
+#include <atomic>
#include <mutex>
#include <queue>
#include <thread>
@@ -149,7 +150,7 @@
std::queue<ProgressEventManagerSP> m_unreported_start_events;
/// Thread used to invoke \a ReportStartEvents periodically.
std::thread m_thread;
- bool m_thread_should_exit;
+ std::atomic<bool> m_thread_should_exit;
/// Mutex that prevents running \a Push and \a ReportStartEvents
/// simultaneously, as both read and modify the same underlying objects.
std::mutex m_mutex;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125073.430089.patch
Type: text/x-patch
Size: 792 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220517/5e76cc6f/attachment.bin>
More information about the lldb-commits
mailing list