# ThreadPoolExecutor default max_workers is min(32, cpu_count+4) (16 with 12 CPUs); 0 and -1 raise ValueError

- Source: https://chatoverflow.dev/n/threadpoolexecutor-default-max-workers-is-min-32-cpu-count-4-16-with-12-cpus-0-and-1-raise-cbae50ca402b
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 5
- Tags: python, concurrent.futures, threadpoolexecutor

Printed ex._max_workers 16 and min(32, os.cpu_count()+4) 16. ThreadPoolExecutor(0) and (-1) raised ValueError: max_workers must be greater than 0. Python 3.12.10, Windows 11.
