views:

116

answers:

2

Hi,

Does anyone know of a Java ExecutorService equivlent in VC++ 2008? What I want is a framework which I can pass tasks to fixed size thread pool. The framework should manage the thread pool itself (i.e. creation and destruction of threads).

+2  A: 

I think Intel Threading Building Blocks supports something like this. Visual Studio 2010 will have Parallel Patterns Library.

Nikola Smiljanić
Oops! Sorry I mistyped, I meant Visual Studio 2008...
Kryten
A: 

Vista has a new thread pool API (in addition to existing, rather spartan thread pool API windows has had for a while): http://msdn.microsoft.com/en-us/library/ms686766%28VS.85%29.aspx . This API is not bound to any specific version of MSVC/VS but of course to use the new stuff you need to have Vista/Server 2008 or better. QueueUserWorkItem and RegisterWaitForSingleObject may be sufficient for your needs. As Nikola points out, 2010 will have the PPL. .NET also has some nice thread pool apis if you can code against C# or maybe C++/CLI instead of C++.

Logan Capaldo