The sherpa.utils.parallel module

Routines for running code in parallel.

Changed in version 4.16.1: All multiprocessing calls are now done using an explicit context, available as the context field, rather than using the global version.

Added in version 4.16.0: Prior to this, these symbols were provided by the sherpa.utils module.

Constants

context

The multiprocessing context used to run the processes.

multi

Can jobs be run in parallel?

ncpus

The number of CPU cores to use when running jobs in parallel.

Functions

parallel_map(function, sequence[, numcores])

Run a function on a sequence of inputs in parallel.

parallel_map_funcs(funcs, datasets[, numcores])

Run a sequence of function on a sequence of inputs in parallel.

parallel_map_rng(function, sequence[, ...])

Run a function on a sequence of inputs in parallel with a RNG.

run_tasks(procs, err_q, out_q[, num])

Run the processes, exiting early if necessary, and return the results.