> You are assumed to have an outside synchronization when using most Qt classes > across multiple threads. Most are not inherently thread safe, especially not > the implicitly shared ones.
Yes for mutations upon a given instance of an implictly shared object. But any const method are safe to be called concurrently (any method that does not implicitly call detach()). Therefore, qIntrusiveDetached() which is const, would be an exception that needs outside synchronization to get a reliable result. Philippe On Thu, 08 Aug 2019 10:46:17 +0200 Allan Sandfeld Jensen <k...@carewolf.com> wrote: > On Thursday, 8 August 2019 10:29:41 CEST Philippe wrote: > > Yet, what is the usefullness of qIntrusiveDetached()? > > Because the result depends on a relaxed load, hence the moment after > > qIntrusiveDetached() was evaluated, rechecking qIntrusiveDetached() > > could give a different result. > > > You are assumed to have an outside synchronization when using most Qt classes > across multiple threads. Most are not inherently thread safe, especially not > the implicitly shared ones. > > 'Allan > _______________________________________________ Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development