Applied patch for threadpool map