* Set maxtasksperchild to help avoid hangs especially on Windows

* Fix function reference
This commit is contained in:
Ross Scroggs
2020-08-11 09:47:03 -07:00
committed by GitHub
parent dbc47c5420
commit 3368bd3879
2 changed files with 5 additions and 4 deletions

View File

@@ -10959,7 +10959,7 @@ def run_batch(items):
if not items:
return
num_worker_threads = min(len(items), GC_Values[GC_NUM_THREADS])
pool = mp_pool(num_worker_threads, init_gam_worker)
pool = mp_pool(num_worker_threads, init_gam_worker, maxtasksperchild=200)
sys.stderr.write(f'Using {num_worker_threads} processes...\n')
try:
results = []