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 
<wall...@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;


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;
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to