June 10, 2010

SABROG SABROG
Lab Rat
82 posts

Q_GLOBAL_STATIC is reentrance now?

 

I read before [qt.gitorious.org] 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.

 Signature 

QT - Apple QuickTime
Qt - Nokia’s Qt Development Frameworks
Apple is a competitor of Nokia, so QT != Qt

2 replies

July 3, 2010

Olivier Goffart Olivier Goffart
Lab Rat
21 posts

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)

May 2, 2011

rmorrison100 rmorrison100
Ant Farmer
1 posts

Thank you Olivier for the explanation.

 Signature 

astrology birth charts

 
  ‹‹ QAtomicInt      XPath query of DOM. ››

You must log in to post a reply. Not a member yet? Register here!