Lightweight implementation of ThreadPool in C++