A ThreadPool library in C++

左心房为你撑大大i 提交于 2019-12-04 03:37:39

问题


I am looking for a good and stable threadpool library for C++ that's fairly well documented. I know about the Native Windows thread pool API and the newer Vista Thread Pool API, however my program requires some backward compatibility, so perhaps an outside library I can provide with the program is better.

I have looked into Boost's threadpool and it doesn't look bad at all, unfortunatly it is not very well documented.

Does anyone know any other libraries that have a ThreadPool in C++? (for Windows)


回答1:


A portable threadpool library that claims to be 'production ready'. You may want to check that out.




回答2:


Intel TBB is another threading library that has some neat stuff. I find the framework for evaluating a tree of expressions in parallell especially nice.




回答3:


Have a look at the ThreadPool and TaskManager classes from the Poco C++ libraries.




回答4:


Qt has a threading library with some nice high-level operations like map/reduce etc, as well as low-level threading stuff and thread-pool support.

Qt might be a bit big for you though, but you can use a part of it pretty easily.




回答5:


With respect to the boost thread pool: this link might be useful: http://think-async.com/Asio/Recipes




回答6:


There's also ACE which does thread-pooling over networks, so it's a fair bit more complex. (but deserves mentioning here, IMO)



来源:https://stackoverflow.com/questions/3853828/a-threadpool-library-in-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!