capping the number of threads to 8

This commit is contained in:
Thomas Ferreira de Lima 2018-08-01 20:24:10 -04:00
parent 18518353ba
commit b0c69d8fe4
No known key found for this signature in database
GPG Key ID: 43E98870EAA0A86E
1 changed files with 2 additions and 2 deletions

View File

@ -72,8 +72,8 @@ def parallelCCompile(self, sources, output_dir=None, macros=None, include_dirs=N
cc_args = self._get_cc_args(pp_opts, debug, extra_preargs)
# parallel code
N = min(N_cores, len(objects) // 2) # number of parallel compilations
print("Compiling", output_dir, "with", N, "threads.")
N = min(N_cores, len(objects) // 2, 8) # number of parallel compilations
print("Compiling with", N, "threads.")
import multiprocessing.pool
def _single_compile(obj):