Answered by:
Are the C++11 threading APIs supported for Metro apps?

Question
-
Are the C++11 threading APIs supported for Metro apps, in particular std::thread but also locks, std::condition_variable, std::atomic?
Wednesday, April 25, 2012 9:28 PM
Answers
-
Hello,
Yes, you can use them in metro. But we would suggest you to use Concurrency Namespace in C++/CX
http://msdn.microsoft.com/en-us/library/dd492819(v=vs.110).aspxAlso, you can follow this blog for PPL C++/CX
http://msdn.microsoft.com/en-us/magazine/hh781020.aspxBest regards,
JesseJesse Jiang [MSFT]
MSDN Community Support | Feedback to us
- Proposed as answer by Steve HorneMicrosoft employee, Moderator Friday, April 27, 2012 9:19 PM
- Marked as answer by Jesse Jiang Monday, May 7, 2012 2:25 AM
Friday, April 27, 2012 9:25 AM -
Related info - http://social.msdn.microsoft.com/Forums/en-US/winappswithnativecode/thread/383152f2-97a1-4593-a22b-d31e09c611a1
Bottom line 1) Compile CRT referencing code with preprocessor defininition WINAPI_FAMILY=WINAPI_FAMILY_APP at the project level 2) If it compiles, it's safe for Metro style.
- Marked as answer by Jesse Jiang Monday, May 7, 2012 2:25 AM
Friday, April 27, 2012 6:21 PMModerator
All replies
-
Hello,
Yes, you can use them in metro. But we would suggest you to use Concurrency Namespace in C++/CX
http://msdn.microsoft.com/en-us/library/dd492819(v=vs.110).aspxAlso, you can follow this blog for PPL C++/CX
http://msdn.microsoft.com/en-us/magazine/hh781020.aspxBest regards,
JesseJesse Jiang [MSFT]
MSDN Community Support | Feedback to us
- Proposed as answer by Steve HorneMicrosoft employee, Moderator Friday, April 27, 2012 9:19 PM
- Marked as answer by Jesse Jiang Monday, May 7, 2012 2:25 AM
Friday, April 27, 2012 9:25 AM -
Related info - http://social.msdn.microsoft.com/Forums/en-US/winappswithnativecode/thread/383152f2-97a1-4593-a22b-d31e09c611a1
Bottom line 1) Compile CRT referencing code with preprocessor defininition WINAPI_FAMILY=WINAPI_FAMILY_APP at the project level 2) If it compiles, it's safe for Metro style.
- Marked as answer by Jesse Jiang Monday, May 7, 2012 2:25 AM
Friday, April 27, 2012 6:21 PMModerator