I'm using Pathos like this:
from pathos.multiprocessing import ProcessingPool as Pool
def foo(bar):
fn1(bar)
fn2(bar)
Pool().map(foo, data)
I want fn1
and fn2
to be executed as one atomic operation such that no threads can produce function calls in a sequence like fn1, fn1, fn2, fn2
.