Any errors that are raised in the spawned processes will remain silent until you actually retrieve the result.
from multiprocessing import Lock, Pool
def worker():
r = other.work()
return r
def main():
pool = Pool(4)
# note: this is apply_async, not apply_sync
result = pool.apply_async(worker,())
result.wait()
# See here
actual_result = result.get()
This will raise:
NameError: global name 'other' is not defined
What you have named result
is a multiprocessing.pool.ApplyResult
object which is more like the promise of a return value, than a return value itself.