change parallel complie num: 32->16

This commit is contained in:
jjfeing 2020-03-30 10:03:48 +08:00
parent 930a1fb0a8
commit 86f5c69995
1 changed files with 4 additions and 2 deletions

View File

@ -150,8 +150,10 @@ class CompilerPool:
def __init__(self): def __init__(self):
processes = multiprocessing.cpu_count() processes = multiprocessing.cpu_count()
if processes > 32: # max_processes_num: Set the maximum number of concurrent processes for compiler
processes = 32 max_processes_num = 16
if processes > max_processes_num:
processes = max_processes_num
self.__pool = multiprocessing.Pool(processes=processes) self.__pool = multiprocessing.Pool(processes=processes)
self.__next_task_id = 1 self.__next_task_id = 1
self.__running_tasks = [] self.__running_tasks = []