I have a pool of processes in python using from multiprocessing import Pool. I pass to those processes different functions to be ran, calling the Pool.apply_async function. If I introduce an error in one of those functions (i.e.: a line of code such as 5/0), the expected command line report ZeroDivisionError: integer division or modulo by zero never shows up, and the program never terminates. Even if I introduce a callback function in the call to Pool.apply_async, the callback function never gets called if the function that the process has to execute has an error on it.
How can I have those processes in the pool report errors and terminate if something goes wrong?