Commit 08135151 authored by Jan Kiene's avatar Jan Kiene
Browse files

allow num of cpus as max_workers as in windows equivalent

parent 17a3401a
Loading
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@
import subprocess
import pathlib
import sys
import os
import concurrent.futures
from threading import Lock

@@ -54,7 +55,7 @@ def main():

    result_dict = dict()
    # run first part in parallel
    with concurrent.futures.ThreadPoolExecutor(max_workers=4) as executor:
    with concurrent.futures.ThreadPoolExecutor(max_workers=os.cpu_count()) as executor:
        executor.map(
            run_file, README_FILES_PARALLEL, BIN_PATHS, [result_dict] * len(README_FILES_PARALLEL)
        )