mpas_tools.parallel.create_pool¶
-
mpas_tools.parallel.
create_pool
(process_count=None, method='forkserver')[source]¶ Crate a pool for creating masks with Python multiprocessing. This should be called only once at the beginning of the script performing cell culling.
pool.terminate()
should be called before exiting the script.- Parameters
process_count (int, optional) – The number of processors or None to use all available processors
method ({'fork', 'spawn', 'forkserver'}) – The mutiprocessing method
- Returns
pool (multiprocessing.Pool) – A pool to use for python-based mask creation.