Does VC++ 2010 have support for C++11's portable atomi开发者_运维百科c type template?
No; none of the C++11 atomic operations or thread support features are supported by Visual C++ 2010.
Both of these sets of features are supported by Visual C++ 2012.
You can use tbb::atomic. It is not the same as C++0x atomics, and is not really meant to be a replacement or temporary substitute for them, but can be used to accomplish the same programming tasks.
InterlockedExchange, InterlockedIncrement and InterlockedDecrement might be of use to you while we wait for VC++ 2012 to wrap them up in standard-compliant wrappers.
You should check out the Concurrency Runtime. It's far more comprehensive than the offerings from the C++ standards committee, and comes in VC10. That is, of course, not particularly portable, but if you want that, then Intel's Thread Building Blocks can work for you.
You could use Boost or a commercial option is http://www.stdthread.co.uk/
精彩评论