[Development] atomic reference counting implementation
marc at kdab.com
Sat Aug 10 14:47:25 CEST 2019
On 2019-08-10 15:41, Kevin Kofler wrote:
> Mutz, Marc via Development wrote:
>> But that's the whole point Olivier was making two years ago: ref() is
>> _documented_ to be a memory barrier:
> But QSharedDataPointer is NOT documented to call
> the documentation just talks about incrementing or decrementing
> counts. So the exact method called is an implementation detail.
> Hence, why can't we just add new QAtomicInteger::refRelaxed and
> QAtomicInteger::derefRelaxed methods and use those in
> instead of plain ref and deref? It is a drop-in replacement, introduces
> code duplication, and does not change any documented behavior.
I'd expect your patch to be duly considered, one you upload it.
More information about the Development