[Development] Unnecessary ambiguity in Qt documentation about reentrancy and safety of const methods.
NIkolai Marchenko
enmarantispam at gmail.com
Sun Jul 19 00:19:46 CEST 2026
> 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 <thiago.macieira at intel.com>
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
> Development at qt-project.org
> https://lists.qt-project.org/listinfo/development
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20260719/169cd750/attachment-0001.htm>
More information about the Development
mailing list