Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Q_GLOBAL_STATIC is reentrance now?
Forum Updated to NodeBB v4.3 + New Features

Q_GLOBAL_STATIC is reentrance now?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 4.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sabrog
    wrote on last edited by
    #1

    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.

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

    1 Reply Last reply
    0
    • O Offline
      O Offline
      ogoffart
      wrote on last edited by
      #2

      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)

      1 Reply Last reply
      0
      • R Offline
        R Offline
        rmorrison100
        wrote on last edited by
        #3

        Thank you Olivier for the explanation.

        <a href="http://www.numerologist.com/articles/uncategorized/astrology-birth-charts/">astrology birth charts</a>

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved