I am using <thread> <atomic> <mutex> etc. in my code, which includes several non-blocking algorithms. I am targeting (eventually) the linux environment. I am developing using the beta version of Visual Studio 2011, which, although terribly terrible in other C ++ 11 features, seems to be the only toolchain that implements parallel functions.
See C ++ 11 support here:
Now, if others just donβt have a library containing the parallel features of C ++ 11, I can easily use just :: thread , however, both clang and gcc answer βnoβ to the C ++ 11 memory model, which apparently , supports at least visual C ++. I'm not quite sure what the effect of this will be - perhaps free code optimization without side effects, among other erroneous things.
If at the moment I completely exclude optimized assemblies and compile only debug assemblies without enabling optimization, is it wise to use the Clang or GCC toolchain?
c ++ multithreading synchronization c ++ 11 lock-free
Eloff
source share