[libcxx-commits] [libcxx] [libcxx] Implementation of non lock-free atomic shared_ptr (PR #194215)
via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Apr 26 12:37:35 PDT 2026
huixie90 wrote:
> This PR is intended as Phase 1: correct, standard-conforming, lock-based. A lock-free follow-up can come once the prerequisite infrastructure is in place.
I don’t see how we can have a follow up lock free PR without breaking the phase 1 ABI
> Is a lock-free implementation strictly required, or is a conforming lock-based implementation acceptable as a first step
even though it is not required, 1-2 years ago I’ve spoken to the author of the original paper https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4058.pdf and they suggested to implement as lock free as the motivations of this class is primary for implementing lock free data structures.
Even though I agree that we haven’t found a portable way implementing it yet, but at least IMO we could try looking into ways to implement the lock free versions for some platforms.
That is my 2c, and I am not blocking PRs doing otherwise
https://github.com/llvm/llvm-project/pull/194215
More information about the libcxx-commits
mailing list