I want to collect time and failure messages in pool.map function calls and print them when all jobs are done. Is that possible in python?
Perhaps there is some event.. or smth else...
failures = []
def test():
sleep(1)
global failures
failures.append('test message')
def main():
data = [...]
pool = ThreadPool(45)
results = pool.map(test, data)
pool.close()
pool.join()
# after all calls are finished i want to perform this
print failures