[Lldb-commits] [PATCH] D139484: [lldb/test] Fix data racing issue in TestStackCoreScriptedProcess
    Jonas Devlieghere via Phabricator via lldb-commits 
    lldb-commits at lists.llvm.org
       
    Tue Dec 13 13:12:48 PST 2022
    
    
  
JDevlieghere added inline comments.
================
Comment at: lldb/test/API/functionalities/scripted_process/main.cpp:25-26
 void call_and_wait(int &n) {
-  std::cout << "waiting for computation!" << std::endl;
-  while (baz(n) != 42)
+  while (baz(n, mutex, cv) != 42) {
     ;
+  }
----------------
Unless I misunderstand the code, I don't think you need this while loop anymore. `baz` should block until the condition variable is changed. 
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139484/new/
https://reviews.llvm.org/D139484
    
    
More information about the lldb-commits
mailing list