Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-6437

Use thread_local instead of __thread under OS X

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • stout

    Description

      stout's THREAD_LOCAL was introduced as an abstraction since Apple's C++ toolchain didn't support thread_local at the time. It uses the extension __thread under OS X, so we cannot create non-POD thread-local vars.

      With Xcode-8 (i.e., with Sierra) and above Apple's toolchain does support thread_local, and we should eventually e.g., remove the THREAD_LOCAL abstraction.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bbannier Benjamin Bannier
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: