[issue35378] multiprocessing.Pool.imaps iterators do not maintain alive the multiprocessing.Pool objects

Pablo Galindo Salgado report at bugs.python.org
Sun Dec 2 11:43:32 EST 2018


New submission from Pablo Galindo Salgado <pablogsal at gmail.com>:

After applying the PRs in issue34172, multiprocessing.Pool.imap hangs on MacOs and Linux. This is a simple reproducer:

import multiprocessing

def the_test():
    print("Begin")
    for x in multiprocessing.Pool().imap(int,
            ["4", "3"]):
        print(x)
    print("End")

the_test()

This happens because the IMapIterator does not maintain alive the multiprocessing.Pool object while it is still alive.

----------
components: Library (Lib)
messages: 330890
nosy: pablogsal, pitrou, tzickel
priority: normal
severity: normal
status: open
title: multiprocessing.Pool.imaps iterators do not maintain alive the multiprocessing.Pool objects
versions: Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35378>
_______________________________________


More information about the Python-bugs-list mailing list