STINNER Victor <vstin...@redhat.com> added the comment:
I suggest you to write: with multiprocessing.Pool(4) as pool: result = tuple(pool.imap(print, (1, 2, 3))) On Python 3.8, your example will now log a resource warning since you don't close/terminate explicitly the pool. ---------- nosy: +vstinner _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35629> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com