portable ThreadPool