Skip to content

Commit 19eaea4

Browse files
committed
[libc++] std::barrier uses native wait
1 parent 73a1383 commit 19eaea4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

libcxx/include/barrier

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,7 @@ public:
142142
return __old_phase;
143143
}
144144
_LIBCPP_HIDE_FROM_ABI void wait(arrival_token&& __old_phase) const {
145-
auto const __test_fn = [this, __old_phase]() -> bool { return __phase_.load(memory_order_acquire) != __old_phase; };
146-
std::__libcpp_thread_poll_with_backoff(__test_fn, __libcpp_timed_backoff_policy());
145+
__phase_.wait(__old_phase, std::memory_order_acquire);
147146
}
148147
_LIBCPP_HIDE_FROM_ABI void arrive_and_drop() {
149148
__expected_adjustment_.fetch_sub(1, memory_order_relaxed);

0 commit comments

Comments
 (0)