diff --git a/pyperformance/run.py b/pyperformance/run.py index a810a62a..280f8b03 100644 --- a/pyperformance/run.py +++ b/pyperformance/run.py @@ -142,7 +142,7 @@ def run_benchmarks(should_run, python, options): executor_input = [(i+1, len(to_run), python, options, bench) for i, bench in enumerate(to_run[1:])] # It's fine to set a higher worker count, because this is IO-bound anyways. - with concurrent.futures.ProcessPoolExecutor(max_workers=len(to_run)-1) as executor: + with concurrent.futures.ProcessPoolExecutor(max_workers=max(1, len(to_run))) as executor: for bench, venv_root, venv, bench_runid, cons_output in executor.map(setup_single_venv, executor_input): if venv_root is not None: venvs.add(venv_root)