Skip to content

Instantly share code, notes, and snippets.


I would recommend Dask for this sort of work as it is easy to produce a task graph and minimise computation overhead

import dask

def A(argument):
    print('Running A with', argument)
    return argument
DomHudson /
Last active Aug 15, 2018
Multiprocessing in Python with Custom Workers
import random
import multiprocessing
context = multiprocessing.get_context()
class Worker(context.Process):
def __init__(self, *args, **kwargs):