Skip to content Skip to sidebar Skip to footer

Python: Multiprocessing Imap & Dynamically-created Pools Freeze

Could someone explain why this code freezes (hangs forever), import multiprocessing def foo(x): return x def main(): print(list(multiprocessing.Pool().imap(foo, iter([1, 2, 3])

Solution 1:

Apparently this is a bug with Python 2.6.7, and has been fixed at least by Python 2.7.3.

This can be worked around by using my vimap package [ https://github.com/gatoatigrado/vimap ].

Post a Comment for "Python: Multiprocessing Imap & Dynamically-created Pools Freeze"