[libcxx-commits] [libcxx] [libc++] fix `counting_semaphore` lost wakeups (PR #79265)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jan 26 09:54:01 PST 2024


https://github.com/ldionne approved this pull request.

CC @jiixyj since you did an amazing analysis of this problem a while back, you might be interested.

This seems reasonable to me. I just went over it with @huixie90 and it looks like this should solve two problems described in https://reviews.llvm.org/D114119, but not the last problem described in https://reviews.llvm.org/D114119#3193088 specifically. It's still an improvement over the status quo.

I find the code for `__atomic_wait` to be really confusing and I wonder whether the `__libcpp_thread_poll_with_backoff` abstraction actually helps or simply makes things harder to understand. I'd welcome if someone has an appetite for refactoring this part of the code.

https://github.com/llvm/llvm-project/pull/79265


More information about the libcxx-commits mailing list