using thread pool to accelerate task execution