Limited the max number of threads that will be created when uploading.