Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
chunksize = chunksize,
callback = callback)
except:
if close_pool:
pool.terminate()
raise
else:
if close_pool:
pool.close()
result = _ParallelAsyncResult(result, pool)
else:
result = _ParallelAsyncResult(result)
else:
values = _serial_map_or_starmap(function, iterable, args, kwargs,
False, map_or_starmap)
result = _DummyAsyncResult(values)
return result