a simple thread pool implemented in c++