sc_parallel#

Functions to allow parallelization to be performed easily.

NB: Uses multiprocess instead of multiprocessing under the hood for broadest support across platforms (e.g. Jupyter notebooks).

Highlights:

Classes

Parallel

Parallelization manager

Functions

parallelize

Execute a function in parallel.

loadbalancer

Delay execution while CPU load is too high -- a very simple load balancer.

cpu_count

Alias to multiprocessing.cpu_count()

cpuload

Takes a snapshot of current CPU usage via psutil

memload

Takes a snapshot of current fraction of memory usage via psutil