Implementation of mongo::ThreadLocalValue incorrectly assumes no support for __thread on Apple

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Internal Code
    • None
    • Fully Compatible
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      We assume that for Apple platforms that the __thread keyword doesn't work.

      https://github.com/mongodb/mongo/blob/master/src/mongo/util/concurrency/threadlocal.h#L120

      However, this isn't a platform thing, it is a compiler thing. Clang on Apple, for instance, does support __thread.

      The check for __thread support should be moved into a Configure time check and a config.h style header, setting something like MONGO_HAVE___THREAD.

            Assignee:
            Unassigned
            Reporter:
            Andrew Morrow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: