[Lldb-commits] [lldb] 046e823 - [lldb/test] Add yield to spin loop in thread_filter test (#191025)

via lldb-commits lldb-commits at lists.llvm.org
Wed Apr 8 11:32:10 PDT 2026


Author: Med Ismail Bennani
Date: 2026-04-08T11:32:04-07:00
New Revision: 046e823c7b9259d9c1aaee8f03b2d5f53f899dd9

URL: https://github.com/llvm/llvm-project/commit/046e823c7b9259d9c1aaee8f03b2d5f53f899dd9
DIFF: https://github.com/llvm/llvm-project/commit/046e823c7b9259d9c1aaee8f03b2d5f53f899dd9.diff

LOG: [lldb/test] Add yield to spin loop in thread_filter test (#191025)

This should fix:
https://lab.llvm.org/buildbot/#/builders/211/builds/7439

The timeout might be caused by three threads busy-spinning at 100% CPU,
starving the CI machine.

Add std::this_thread::yield() to the spin loop to reduce CPU pressure
while keeping threads alive at a debugger-friendly location.

Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>

Added: 
    

Modified: 
    lldb/test/API/functionalities/scripted_frame_provider/thread_filter/main.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/test/API/functionalities/scripted_frame_provider/thread_filter/main.cpp b/lldb/test/API/functionalities/scripted_frame_provider/thread_filter/main.cpp
index 90dc6aee1ac27..2f73b97846619 100644
--- a/lldb/test/API/functionalities/scripted_frame_provider/thread_filter/main.cpp
+++ b/lldb/test/API/functionalities/scripted_frame_provider/thread_filter/main.cpp
@@ -12,7 +12,7 @@ void thread_work() {
   while (g_barrier.load() > 0)
     ;
   while (g_spin) // break in thread
-    ;
+    std::this_thread::yield();
 }
 
 int main() {


        


More information about the lldb-commits mailing list