我正在寻找一个良好且稳定的 C++ 线程池库,该库有很好的文档记录。我了解本机 Windows 线程池 API 和较新的 Vista 线程池 API,但是我的程序需要一些向后兼容性,因此也许我可以为程序提供的外部库更好。
我研究了 Boost 的线程池,它看起来一点也不差,不幸的是它没有很好的文档记录。
有谁知道其他有 C++ ThreadPool 的库吗? (适用于 Windows)
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)
发布评论
评论(6)
Qt 有一个 线程库 具有一些不错的高级操作,例如map/reduce 等,以及低级线程内容和线程池支持。
虽然 Qt 对你来说可能有点大,但你可以很容易地使用它的一部分。
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.
看看 ThreadPool 和 TaskManager 来自 Poco C++ 库。
Have a look at the ThreadPool and TaskManager classes from the Poco C++ libraries.
关于 boost 线程池:此链接可能有用: http://think-async.com/Asio /食谱
With respect to the boost thread pool: this link might be useful: http://think-async.com/Asio/Recipes
还有 ACE 可以通过网络进行线程池,所以它有点公平更复杂。 (但值得一提的是,IMO)
There's also ACE which does thread-pooling over networks, so it's a fair bit more complex. (but deserves mentioning here, IMO)
一个可移植的线程池库,声称“生产就绪”。您可能想检查一下。
A portable threadpool library that claims to be 'production ready'. You may want to check that out.
英特尔 TBB 是另一个线程库,它有一些巧妙的东西。我发现并行评估表达式树的框架特别好。
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.