threadpool is a cross-platform C++ thread pool library. threadpool library provides a convenient way for dispatching asynchronous tasks and can be easily customized. threadpool is based on the high-quality Boost source libraries.
A thread pool manages a group of threads in order to process a large number of tasks. Since multiple threads can be executed in parallel this approach may be very efficient regarding the overall program performance on many computer systems. By restricting the number of threads and by reusing them resources are saved and additionally the system stability is increased.
The threadpool library provides a convenient way for dispatching asynchronous tasks. Pools can be customized, managed dynamically and easily integrated into your software.
Here are some key features of "threadpool":
· Policy-based thread pool implementation
· Scheduling policies: fifo, lifo and priority
· Size policies: static_size
· Size policy controller: empty_controller, resize_controller
· Shutdown policies: wait_for_all_tasks, wait_for_active_tasks, immediately
· Smooth integration into STL and boost
Boost is a collection of high-quality C++ libraries and works on almost any modern operating system, including UNIX and Windows variants. In fact threadpool is only a small extension to the portable Boost source libraries. It incorporates the thread pool concept by using the thread library from William Kempf. For more information on this excellent library visit Boost.org.
Installing & Using threadpool
threadpool consists only of header files, and so there is no need to build the library itself before using it in your own applications. You simply need to add the following directories to your compiler include path:
threadpool's include directory
the boost directory (e.g. the one called boost_1_33_0)
Furthermore you have to compile boost's thread library and link against it (libboost_thread-*.lib under Windows).
What's New in This Release:
· Made threadpool compatible to boost::thread 1.35.x code base
· Fixed compiler warning in scope_guard.hpp