C++ ThreadPool fix