STL based threadpool implementation