I'm trying to learn how to use Python's
multiprocessing package, but I don't understand the difference between
I noticed that both
imap are executed asynchronously. So when should I use one over the other? And how should I retrieve the result returned by
Should I use something like this?
def test(): result = pool.map_async() pool.close() pool.join() return result.get() result=test() for i in result: print i