Message360736
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. |
|
Date |
User |
Action |
Args |
2020-01-26 22:30:15 | Gabriel Tardif | set | recipients:
+ Gabriel Tardif, docs@python |
2020-01-26 22:30:15 | Gabriel Tardif | set | messageid: <1580077815.77.0.653421680761.issue39458@roundup.psfhosted.org> |
2020-01-26 22:30:15 | Gabriel Tardif | link | issue39458 messages |
2020-01-26 22:30:15 | Gabriel Tardif | create | |
|