Fix run-batch to handle 0 items (#363)

This commit is contained in:
Ross Scroggs
2016-12-21 12:04:30 -08:00
committed by Jay Lee
parent 73bcadbbfe
commit d5bcac4d14

View File

@ -10180,6 +10180,8 @@ gam create project
def run_batch(items):
from multiprocessing import Pool
if not items:
return
num_worker_threads = min(len(items), GC_Values[GC_NUM_THREADS])
pool = Pool(processes=num_worker_threads)
sys.stderr.write(u'Using %s processes...\n' % num_worker_threads)