XCode < 8 does not support the C++11 `thread_local` construct. As a
result, we added a workaround to use `__thread` on OSX and
`thread_local` on other platforms:

https://reviews.apache.org/r/36845/

Since that workaround was added, XCode 8 has been released (in
September 2016) with support for `thread_local`.

If we required XCode >= 8.0 for building Mesos, we could remove this
workaround and use `thread_local` on all platforms. This would have
some advantages, such as:

(1) More uniform, standards-compliant code between OSX and other platforms.

(2) `thread_local` supports a few features that `__thread` does not,
such as support for non-POD data types.

Therefore, I'd like to propose we make XCode 8 a requirement for
building Mesos on OSX, and then get rid of the `THREAD_LOCAL`
workaround. Since XCode 8.0 requires OSX 10.11.5, this would also
imply dropping support for OSX 10.10.

Feedback welcome.

Neil

Reply via email to