Skip to content

Conversation

@huixie90
Copy link
Member

@huixie90 huixie90 commented Dec 7, 2025

hmm. one of the test that is impacted is lost_wake_up test for semaphore (which ueses std::barrier). but that test will become irrelevant after
#171041

for this patch, here are some stats for the CI runner

Linux

before

43.34s: llvm-libc++-shared.cfg.in :: std/thread/thread.semaphore/lost_wakeup.pass.cpp

after

108.76s: llvm-libc++-shared.cfg.in :: std/thread/thread.semaphore/lost_wakeup.pass.cpp

macOS

before

475.32s: llvm-libc++-shared.cfg.in :: std/thread/thread.semaphore/lost_wakeup.pass.cpp

after

248.71s: llvm-libc++-shared.cfg.in :: std/thread/thread.semaphore/lost_wakeup.pass.cpp

windows

before

80.29s: llvm-libc++-shared-clangcl.cfg.in :: std/thread/thread.semaphore/lost_wakeup.pass.cpp

after

timeout

@huixie90 huixie90 marked this pull request as ready for review December 7, 2025 15:05
@huixie90 huixie90 requested a review from a team as a code owner December 7, 2025 15:05
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Dec 7, 2025
@llvmbot
Copy link
Member

llvmbot commented Dec 7, 2025

@llvm/pr-subscribers-libcxx

Author: Hui (huixie90)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/171036.diff

1 Files Affected:

  • (modified) libcxx/include/__thread/timed_backoff_policy.h (-2)
diff --git a/libcxx/include/__thread/timed_backoff_policy.h b/libcxx/include/__thread/timed_backoff_policy.h
index 35a72eb61f77e..c6b6e4bbf9142 100644
--- a/libcxx/include/__thread/timed_backoff_policy.h
+++ b/libcxx/include/__thread/timed_backoff_policy.h
@@ -29,8 +29,6 @@ struct __libcpp_timed_backoff_policy {
       __libcpp_thread_sleep_for(chrono::milliseconds(8));
     else if (__elapsed > chrono::microseconds(64))
       __libcpp_thread_sleep_for(__elapsed / 2);
-    else if (__elapsed > chrono::microseconds(4))
-      __libcpp_thread_yield();
     else {
     } // poll
     return false;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants