Dave
Dave

Reputation: 1659

Windows Threading Options

I would like to evaluate my threading options for a Visual C++ 2010 (non-managed) console application.

Can anybody suggest a good reference for the native Win32 threading API?

What non-native options are recommended?

Thanks!

Best, Dave

Upvotes: 0

Views: 230

Answers (6)

Ajay
Ajay

Reputation: 18431

Better start off with Concurrency Runtime in Visual C++, which utilizes UMS threads in Windows 7, and Windows 2008. It is the the future of concurrency/parallel-programming.

Upvotes: 0

James Johnston
James Johnston

Reputation: 9492

Nobody mentioned this one: Intel Threaded Building Blocks. If you are trying to write parallel algorithms this one can save a lot of time. It's a good mature alternative to OpenMP that doesn't rely on pragmas.

Upvotes: 1

C.J.
C.J.

Reputation: 16091

I think this is a better reference to get someone started using windows threads: http://msdn.microsoft.com/en-us/library/ms682516(v=VS.85).aspx

It shows how to use threads using WinAPI, versus just the reference documentation. Also if you want the definitive book on how to use C, non-managed threads using C/C++ on windows, then the book: "Windows via C/C++ by Jeffrey Richter", Microsoft Press is the one to read. It is excellent, and gives you so many nuts and bolts of threading, it's just great.

Upvotes: 3

Necrolis
Necrolis

Reputation: 26171

For non-native(really these just wrap the native options) options its basically between boost(now part of C++11) and pthreads. For native thread developement you have either WinAPI or CRT threads, thanks to some recent-ish bug fixes, WinAPI is your better option, which is basically CreateThread, MSDN has all the documentation you need under the threading and synchronization sections, but I'd recommend using boost/C++11 threads just to make life simpler coding-wise.

Upvotes: 2

Catalin Serafimescu
Catalin Serafimescu

Reputation: 369

You have several choices: Open MP, MPI, Boost, RogueWave. Or from MS itself: http://msdn.microsoft.com/en-us/library/ms684847(v=vs.85).aspx,

Upvotes: 4

Daniel Walker
Daniel Walker

Reputation: 770

I don't have much experience with the native Win32 threading facilities, but for C++, Boost's threading library is nice. http://www.boost.org/doc/libs/1_47_0/doc/html/thread.html

Upvotes: 1

Related Questions