Almost in boost threadpool might be of some use.