Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Q_GLOBAL_STATIC is reentrance now?
sabrog last edited by
I read "before ":http://qt.gitorious.org/qt/pages/CodingConventions what macros Q_GLOBAL_STATIC is NOT reentrant, but i don't know what year this convention will be written. How about now? This macros have atomic pointer (QBasicAtomicPointer) and used everywhere in Qt sources.
ogoffart last edited by
Q_GLOBAL_STATIC is re-entrant and thread safe.
Note however that the constructor of your object might be called several time (from different threads (but the extra objects are destroyed quickly)
rmorrison100 last edited by
Thank you Olivier for the explanation.