Skip to content

Commit

Permalink
Use threads because windows is unhappy
Browse files Browse the repository at this point in the history
  • Loading branch information
Fidget-Spinner committed Dec 16, 2024
1 parent db29d34 commit aefde59
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyperformance/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ 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=max(1, len(to_run))) as executor:
for bench, venv_root, venv, bench_runid, cons_output in executor.map(setup_single_venv, executor_input):
with concurrent.futures.ThreadPoolExecutor(max_workers=max(1, len(to_run))) as executor:
for bench, venv_root, venv, bench_runid, cons_output in list(executor.map(setup_single_venv, executor_input)):
if venv_root is not None:
venvs.add(venv_root)
benchmarks[bench] = (venv, bench_runid)
Expand Down

0 comments on commit aefde59

Please sign in to comment.