diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2022-03-24 16:03:13 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2022-03-25 16:19:20 +0100 |
commit | 27f6c4106c55c761d39d5743255a4c963ba4430f (patch) | |
tree | cf2712858027e034eecea2e2e172bb7ecc2db3b2 /src/corelib/global | |
parent | 328ab29c2542c2b7229530053a9232a71f70aae9 (diff) |
Remove mention of Q_GLOBAL_STATIC being more thread safe than local statics
As of C++11 local statics are guaranteed to be thread safe, so this
advantage doesn't hold anymore.
Pick-to: 6.2 6.3
Change-Id: I9ac34b8af30e44ff8134e5f81f45c8aa0f8ddcc9
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'src/corelib/global')
-rw-r--r-- | src/corelib/global/qglobalstatic.qdoc | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/corelib/global/qglobalstatic.qdoc b/src/corelib/global/qglobalstatic.qdoc index 1e3fc6f11c..5d52a25127 100644 --- a/src/corelib/global/qglobalstatic.qdoc +++ b/src/corelib/global/qglobalstatic.qdoc @@ -70,10 +70,6 @@ \li the order of initialization and destruction among different translation units is not determined, leading to possible uses before initialization or after destruction; - - \li if it is found inside a function (that is, not global), it will be - initialized on first use, but many current compilers (as of 2013) do - not guarantee that the initialization will be thread-safe; \endlist The Q_GLOBAL_STATIC macro solves all of the above problems by guaranteeing |