ReferenceCount and RefCountBase currently use sequentially consistent atomics to implement reference counting, but this is stricter than is needed. There is a atomic_refcnt version that uses more relaxed operations. If possible we should unify our implementations and use more relaxed atomics. Here's an example implementation from boost
ReferenceCount
andRefCountBase
currently use sequentially consistent atomics to implement reference counting, but this is stricter than is needed. There is aatomic_refcnt
version that uses more relaxed operations. If possible we should unify our implementations and use more relaxed atomics. Here's an example implementation from boostRelated to https://github.com/chapel-lang/chapel/issues/11852