[libcxx-commits] [libcxx] [libc++] Deprecate the C++20 synchronization library before C++20 (PR #86410)

via libcxx-commits libcxx-commits at lists.llvm.org
Fri Apr 12 11:01:04 PDT 2024


EricWF wrote:

> I have to disagree. The synchronization library is currently really complex and has (or at least had) several subtle bugs. Some of those can be tracked down in part to the difficulty to reason about stuff like `__libcpp_thread_poll_with_backoff`'s flow which would be a lot clearer if we localized e.g. `__atomic_wait_poll_impl`, but that requires lambdas. This desire to deprecate and remove didn't come out of nowhere, it came out of hours of @huixie90 and I plowing through the implementation trying to understand it and often thinking "wow this would have been a lot easier to understand if we had this or that feature".

I'll take your word on that. The surface level complexity of the functions we've applied the deprecation macro to don't immediately make that clear.

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


More information about the libcxx-commits mailing list