Re: thread_local supported on Apple

2016-12-21 Thread Joris Van Remoortere
__thread is a compiler intrinsic and not part of the standard. thread_local was introduced in the c++11 standard. Until recently the default version of clang shipped on the apple platform was not in compliance with the c++11 standard because the team saw an opportunity for a higher performance impl

Re: thread_local supported on Apple

2016-12-20 Thread Vinod Kone
A consequence of using `__thread` on Apple is that initializers for thread locals are required to be constant expressions. This is not the case for the c++11 standard `thread_local`. Can you expand on the benefits of 'thread_local'? Is the above statement alluding to tech debt or preventing new f

Re: thread_local supported on Apple

2016-12-20 Thread Michael Park
Joris, I don't have a strong stance here. I was just providing a data point of what people may experience out of the box. Am I correct in understanding the following implications? - 10.10 would require brew-installed clang to work - 10.11 would require a Xcode upgrade - 10.12 would work out

Re: thread_local supported on Apple

2016-12-19 Thread James Peach
> On Dec 19, 2016, at 3:00 PM, Joris Van Remoortere wrote: > > Thanks for your input Zameer. > > Is it common for developers on mac to use XCode as their compilation > environment as well? I would think if you used clang on the command line > then you could still install an updated version of c

Re: thread_local supported on Apple

2016-12-19 Thread Joris Van Remoortere
Thanks for your input Zameer. Is it common for developers on mac to use XCode as their compilation environment as well? I would think if you used clang on the command line then you could still install an updated version of clang without having to do a system upgrade from Yosemite? I'm getting the

Re: thread_local supported on Apple

2016-12-19 Thread Zameer Manji
I believe this thread_local support is in XCode 8.2. From the link you shared: > Xcode 8.2 requires a Mac running macOS 10.11.5 or later This means that users can upgrade the compiler on El Capitan just fine without a system upgrade. Users on Yosemite need to do a system upgrade to pick up the n

Re: thread_local supported on Apple

2016-12-19 Thread Joris Van Remoortere
Is my understanding incorrect regarding the ability to upgrade the compiler version on Yosemite and El Capitan without requiring a full system upgrade? @Mpark are you making a case for not updating to `thread_local` just yet? — *Joris Van Remoortere* Mesosphere On Fri, Dec 16, 2016 at 11:11 AM,

Re: thread_local supported on Apple

2016-12-16 Thread Michael Park
Brief survey from the #dev channel: https://mesos.slack.com/ archives/dev/p1481760285000430 Yosemite 10.10: Fail. Compilation error. (by @hausdorff https://mesos.slack.com/archives/dev/p1481760552000435) El Capitan 10.11: Fail. Compilation error. (by @zhitao https://mesos.slack.com/files/zhitao/F3

Re: thread_local supported on Apple

2016-12-15 Thread tommy xiao
+1 2016-12-15 7:27 GMT+08:00 Joris Van Remoortere : > The time has come and we finally have `thread_local` support in the Apple > tool chain: > https://developer.apple.com/library/content/releasenotes/ > DeveloperTools/RN-Xcode/Introduction.html > > In our code base we have a special exception fo

thread_local supported on Apple

2016-12-14 Thread Joris Van Remoortere
The time has come and we finally have `thread_local` support in the Apple tool chain: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html In our code base we have a special exception for Apple that defines our thread local to be `__thread` rather than