def main():
    src = np.ones((100, 100))
p = RowProcessor(src)
pool = Pool(processes=16)
rows = pool.map(p, list(range(100)))
print(rows)
if __name__ == '__main__':
    main()
Alternative use patterns for python multiprocessing avoiding proliferation of global state?