We’re developing something for the Windows platform and we’d like to harness the multiple cores present in PCs nowadays.
I know that in VS2010, there is the Concurrency Runtime. It’s still on Beta, though. For the meantime that we do need to release quality code now, what is a good option for an API that will allow smooth transition later. Other suggestions?
I know of:
I would recommend the Intel Thread Building Blocks as it’s a higher level of abstraction over most of the other multi-threaded API’s. It’s also open source so you can download and see how some of the stuff is done. Upcomming versions are meant to use the windows Concurrency Runtime if it’s available. I’ve also read that Intel have submitted TBB to be included into the C++ standard.
pthreads and the Win32 API are lower level primitives that require you to understand the multi-threaded environment a lot better. If you know what you are doing, these tools give you the most control.
I have yet to use the new c++ threading support but they look to be on the same level or a little higher as pthreads. Just Software has some interesting articles on how to use the new c++ thread library.
I have only read about OpenMP and I’m not sure what it’s like to use.
You may like to read Joe Duffy’s Concurrent Programming on Windows book.
Herb Sutter also posts lots of articles under the title Effective Concurrency.
Hope that helps.