>   to call the same function, on the same data, from multiple threads,
without synchronization, provided that any shared data is accessed
exclusively along const paths

I think something went wrong with the wording here. "Same function, on the
same instance, from multiple threads..."


On Sun, Jul 19, 2026 at 12:54 AM Thiago Macieira <[email protected]>
wrote:

> On Saturday, 18 July 2026 14:47:13 Pacific Daylight Time Giuseppe D'Angelo
> via
> Development wrote:
> > I think we should officially extend the contract, because:
>
> Agreed.
>
>
> > The tradeoff is that the functions that are currently marked as
> > reentrant and use lazy initialization, caching, or any similar
> > thread-unsafe techniques, need to be documented to be *not* reentrant.
> > Luckily there should be very few of such functions. I guess that
> > documenting these few exceptions is a smaller loss than the gain of
> > aligning ourselves to C++ established practices / people's expectations.
>
> Preferably, fix those we can, because we can't expect everyone to have
> read the
> documentation. Even if they have, exceptions to the rule are hard to
> remember.
>
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Principal Engineer - Intel DCG - Platform & Sys. Eng.
> --
> Development mailing list
> [email protected]
> https://lists.qt-project.org/listinfo/development
>
-- 
Development mailing list
[email protected]
https://lists.qt-project.org/listinfo/development

Reply via email to