a simple thread pool implementation in c++