swifco_rs.utils module

swifco_rs.utils.run_parallel(run, jobs, processes=None)

Runs a callback a given number of times in parallel, yielding the results of invocations. The callback takes a parameter, taken from jobs, e.g. a run ID.

Parameters
  • run – The callback to run

  • jobs – A iterable of job parameters, e.g. range(100)

  • processes – The number of processes/threads to use