Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-5739

Race condition in SOMETIMES/MONGO_SOMETIMES macros

    XMLWordPrintable

    Details

      Description

      The definition of MONGO_SOMETIMES contains a race condition. It's current implementation is as follows:

      #define MONGO_SOMETIMES( occasion, howOften ) for( static unsigned occasion = 0; ++occasion % howOften == 0; )

      Plain-and-simple not thread safe.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              billy.donahue Billy Donahue
              Reporter:
              schwerin Andy Schwerin
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: