pyhctsa.distribute.LocalDistributor¶
-
class pyhctsa.distribute.LocalDistributor(n_workers=
None)¶ Local process-based distributor using a pathos ProcessPool.
This distributor parallelises work across local worker processes using pathos.multiprocessing.ProcessPool.
- Parameters:¶
- n_workers : int, optional¶
Number of worker processes to use. If
None, defaults tomultiprocessing.cpu_count().
Methods
__init__([n_workers])calculate_chunk_size(n_items, n_workers)Calculate the number of chunks to distribute amongst the workers.
close()Cleanup resources
map(func, data, **kwargs)Apply func to every element in iterable and return results