This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients Anthony Sottile, pablogsal, pitrou, remi.lapeyre, vstinner
Date 2019-01-04.22:40:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <[email protected]>
In-reply-to
Content
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.
History
Date User Action Args
2019-01-04 22:40:35vstinnersetrecipients: + vstinner, pitrou, Anthony Sottile, pablogsal, remi.lapeyre
2019-01-04 22:40:33vstinnersetmessageid: <[email protected]>
2019-01-04 22:40:33vstinnerlinkissue35629 messages
2019-01-04 22:40:33vstinnercreate