Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C++ Windows Thread pool (non-boost/c++11)

Tags:

c++

visual-c++

Is there any way to create a threadpool only using C++ or Windows C++ functions? I dont have access to boost or any libraries (I can access code project but couldnt find anything non-unix) and I am finding it hard to find a way to implement a threadpool.

I am using VS2010 which doesnt support the C++11 threading yet, hence why I'm a little stuck!

like image 584
mezamorphic Avatar asked May 10 '26 08:05

mezamorphic


1 Answers

In case your target is Windows Vista or later you can use this thread pool: http://msdn.microsoft.com/en-us/library/windows/desktop/ms686980%28v=vs.85%29.aspx

The page also has a example in C++.

like image 53
BertR Avatar answered May 11 '26 20:05

BertR