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 Gabriel Tardif
Recipients Gabriel Tardif, docs@python
Date 2020-01-26.22:30:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1580077815.77.0.653421680761.issue39458@roundup.psfhosted.org>
In-reply-to
Content
Hello

This bug is about the maxtasksperchild parameter in the Pool object constructor of the multiprocessing module.

When you set processes = 1 in the Pool constructor
maxtasksperchild value is double by two for unknow raison whatever the maxtaskperchild value.

As mentionned in the documentation, once the process has reach the maxtasksperchil value it should rebuild itself in the memory from the parent process.

In the short python exemple provided below, you can see the value of showedFiles of each process incresing over 1 which is not normal if Pool constructor is set to processes = 1, maxtasksperchil = 1.

The only running process should destroy / reset itself and so set its value 'showedFiles' to 0 first and 1 for each os.listdir() entry.
History
Date User Action Args
2020-01-26 22:30:15Gabriel Tardifsetrecipients: + Gabriel Tardif, docs@python
2020-01-26 22:30:15Gabriel Tardifsetmessageid: <1580077815.77.0.653421680761.issue39458@roundup.psfhosted.org>
2020-01-26 22:30:15Gabriel Tardiflinkissue39458 messages
2020-01-26 22:30:15Gabriel Tardifcreate