In this blog I found a pretty neat example on how to create a simple thread pool using boost::asio. I basically want to use it like this:
#include
Boost.Asio is not solely for network programming, see the reference documentation. It has extensive support for things like
deadline_timer
)I've used it for other purposes in several applications as well. One example being a thread pool to service potentially long running blocking database operations while providing an asynchronous interface for the application. Boost.Asio really is a very powerful library. Using it for a general purpose thread pool as you propose can work just fine.