jztools.parallelization.multiprocessing.handlers#

Classes

ProcessParallelizer([do_raise, verbose, ...])

param do_raise:

If True, Raise an exception as soon as it is received internally. Otherwise, will return the exception object.

ProcessPoolExecutor([max_workers, ...])

Thin wrapper around concurrent.futures.ProcessPoolExecutor.

class jztools.parallelization.multiprocessing.handlers.ProcessPoolExecutor(max_workers=None, mp_context=None, initializer=None, initargs=())#

Bases: ProcessPoolExecutor

Thin wrapper around concurrent.futures.ProcessPoolExecutor.

class jztools.parallelization.multiprocessing.handlers.ProcessParallelizer(do_raise: bool = False, verbose=False, tqdm_kwargs={}, **pool_executor_kwargs)#

Bases: _Parallelizer

Parameters:
  • do_raise – If True, Raise an exception as soon as it is received internally. Otherwise, will return the exception object.

  • verbose – Use tqdm to display progress.

  • tqdm_kwargs – Dictionary of keyword arguments passed to tqdm.

  • pool_executor_kwargs – Variable keyword args passed to the pool executor initializer.

PoolExecutor#

alias of ProcessPoolExecutor