Merge pull request #2305 from ludovic-henry/fix-threadpool-36414