New submission from Pablo Galindo Salgado <pablog...@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 <rep...@bugs.python.org> <https://bugs.python.org/issue35378> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com