C++ thread job manager