Merge pull request #2341 from ludovic-henry/fix-threadpool-max-worker