rmaprath added a subscriber: STL_MSFT.
rmaprath added a comment.

In http://reviews.llvm.org/D20328#451178, @mclow.lists wrote:

> Also, I don't see how this can be retargeted "at runtime"; are you implying 
> that someone can choose at program launch time what threading system to use?


Yup, users can link their objects with an implementation of the dynamic 
threading API and it should all be fine.

> How could that work given (say) a constexpr constructor for a mutex type?

>  [ I read the previous discussion, but still don't see how to make it work]


Yeah, that is a real pain point. I have provided a sample implementation of the 
API in `test/support/external_threads.cpp` (last file in this patch) where I've 
adopted a initialize-on-first-use policy to workaround this particular problem. 
I've put a bunch of comments there to explain the details.

The `constexpr` mutex constructor is apparently also a pain point on windows 
[1], I'm sure @STL_MSFT knows more about it.

Thanks!

/ Asiri

[1] 
https://blogs.msdn.microsoft.com/vcblog/2015/06/02/constexpr-complete-for-vs-2015-rtm-c11-compiler-c17-stl/


http://reviews.llvm.org/D20328



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to