[Lldb-commits] [lldb] [lldb/test] Add yield to spin loop in thread_filter test (PR #191025)
Med Ismail Bennani via lldb-commits
lldb-commits at lists.llvm.org
Wed Apr 8 11:15:46 PDT 2026
https://github.com/medismailben created https://github.com/llvm/llvm-project/pull/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.
>From ee792778fdc7392dd8f90c684538d256e2896eb0 Mon Sep 17 00:00:00 2001
From: Med Ismail Bennani <ismail at bennani.ma>
Date: Wed, 8 Apr 2026 11:13:59 -0700
Subject: [PATCH] [lldb/test] Add yield to spin loop in thread_filter test
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>
---
.../scripted_frame_provider/thread_filter/main.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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