What is the best practice for thread-safe access to variable in WinRT.
Let say I have 100 threads that upon completion each increments one and the same counter (sure it's very simple example that can be done other way around, but I choose it just for the sake of the example).
How shall I implement the thread-safety so to not be data race condition?
Searching only for C++(/CX) example.