0

Is there any reason why you would want to specify the parameter for max_workers? Why would you not keep it set to None, the default? Is it ever faster to have less workers?

db702
  • 559
  • 4
  • 12
  • What about a scenario where you are trying to use parallel processing, but you don't want to tie up all of your available processor threads on a single task? – G. Anderson Apr 26 '19 at 21:40
  • Related: 1) https://stackoverflow.com/questions/40492894/python-multithreading-max-workers?noredirect=1&lq=1 2) https://stackoverflow.com/questions/47498288/number-of-max-workers-when-using-threadpoolexecutor-from-concurrent-futures/51043191#51043191 3) https://stackoverflow.com/questions/53385479/python-concurrent-futures-threadpoolexecutor-max-workers Maybe someone will come and mark them as dupe? – sanyassh Apr 26 '19 at 21:44
  • @G.Anderson sure but if speed is the only factor, should you ever limit the amount of workers? – db702 Apr 27 '19 at 22:27
  • If speed _were_ truly the _only_ factor, then I can't think of a reason to limit it. However, in a real world scenario, I can think of several cases where that might not be the case, which is why the functionality needs to exist as an option – G. Anderson Apr 29 '19 at 15:20
  • Possible duplicate of [Python multithreading max\_workers](https://stackoverflow.com/questions/40492894/python-multithreading-max-workers) – G. Anderson Apr 29 '19 at 15:21

0 Answers0