From 27f6c4106c55c761d39d5743255a4c963ba4430f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 24 Mar 2022 16:03:13 +0100 Subject: [PATCH] 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 --- src/corelib/global/qglobalstatic.qdoc | 4 ---- 1 file changed, 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