C++ Pthread Pool