Date: Mon, 17 Feb 2025 21:44:46 -0700
> On Feb 17, 2025, at 21:11, Nate Eldredge via Std-Discussion <std-discussion_at_[hidden]> wrote:
>
> So the proposed wording, the promised (strongly) happens-before between each shared_ptr destructor and the deleter, which are potentially in different threads, can in practice only be achieved by having a release barrier
Both release and acquire, I should have said. As Brian Bi said, that could be done either by simple acq_rel, or release plus an acquire fence, or in some other implementation-specific way.
> on the reference counter decrement. And once that exists, then having your operation sequenced-before the shared_ptr destructor suffices.
>
> So the proposed wording, the promised (strongly) happens-before between each shared_ptr destructor and the deleter, which are potentially in different threads, can in practice only be achieved by having a release barrier
Both release and acquire, I should have said. As Brian Bi said, that could be done either by simple acq_rel, or release plus an acquire fence, or in some other implementation-specific way.
> on the reference counter decrement. And once that exists, then having your operation sequenced-before the shared_ptr destructor suffices.
Received on 2025-02-18 04:45:00